Script won't load on start
-
Does anyone know why when I put my script into the scripts folder and load the game it isn't there and I have to reload scripts in-game to get it to appear?
[21:25:28] [INFO] Started script Shop_Robbery.Main.
[21:25:31] [ERROR] Caught fatal unhandled exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Shop_Robbery.Main.onTick(Object sender, EventArgs e) in C:\Scripts\Shop Robbery\Shop Robbery\shoprobbery.cs:line 47
at System.EventHandler.Invoke(Object sender, EventArgs e)
at SHVDN.Script.MainLoop()
[21:25:31] [ERROR] The exception was thrown while executing the script Shop_Robbery.Main.
[21:25:31] [WARNING] Aborted script Shop_Robbery.Main.This is the mission section from the SHVDN2.log if it helps.
-
@Kieran_S said in Script won't load on start:
[ERROR] Caught fatal unhandled exception:
As you can already see It defines a fatal error which holds the Script from loading correctly.
If you're the developer
Share the code hereIf you're the consumer
Recheck the source you got the Script from, update your Scripthook and similar.Best regards.
-
@AlteredCarbonate Thanks for the feedback. I have now figured it out.