Jump to content

[Q] How do I solve this .NET problem?


Recommended Posts

 

Error during Tick in script 'MyScript.MyClass':

System.NullReferenceException: Object reference not set to an instance of an object.

at MyScript.MyClass.On_KeyDown(Object sender, KeyEventArgs e)

at GTA.Script.ProcessEvents()

at GTA.Script.DoTick()

at GTA.ScriptThread.OnTick()

That's what the ScriptHook's log file says every time my script crashes.

 

The thing is I do not use the ticks in my script... so...

I don't know.

 

Anybody?

 

Oh, and I use the GTAIV .Net Script Hook v0.893 BETA.

 

Edited: Oh, and the key press works fine.. it gets inside the function... but then it gives me this error.

Edited by Sagiy19
Link to comment
https://gtaforums.com/topic/458957-q-how-do-i-solve-this-net-problem/
Share on other sites

Error during Tick in script 'MyScript.MyClass':

System.NullReferenceException: Object reference not set to an instance of an object.

at MyScript.MyClass.On_KeyDown(Object sender, KeyEventArgs e)

at GTA.Script.ProcessEvents()

at GTA.Script.DoTick()

at GTA.ScriptThread.OnTick()

That's what the ScriptHook's log file says every time my script crashes.

 

The thing is I do not use the ticks in my script... so...

I don't know.

 

Anybody?

 

Oh, and I use the GTAIV .Net Script Hook v0.893 BETA.

 

Edited: Oh, and the key press works fine.. it gets inside the function... but then it gives me this error.

mhhh...why is this section called "III Coding" ah! maybe because its for III Coding! cool.gif

 

this belongs into IV Coding

 

don't repost! wait until the moderators move it there

 

cheers

Oh, nevermind, I figured it out....

 

I had a null reference in one of my variables.

 

 

mhhh...why is this section called "III Coding" ah! maybe because its for III Coding!  cool.gif

 

this belongs into IV Coding

 

don't repost! wait until the moderators move it there

 

cheers

Oh, I know what happen, I viewed the "Modding Rules" thread and that took me to the III Era Modding and then I posted this.

Edited by Sagiy19

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.