View previous topic :: View next topic |
Author |
Message |
iGuzmonJ How do I cheat? Reputation: 0
Joined: 24 Oct 2014 Posts: 9
|
Posted: Sat Feb 21, 2015 3:53 pm Post subject: Nil Value Error |
|
|
Everytime i click on my button to toggle on and off the cheat, all i get is a nil value error. I am not sure on how to fix this. Here is my code, and yes, i do have all of my stuff named correctly.
Code: | function CEToggleBox1Change(sender)
if (checkbox_getState(UDF1.CEToggleBox1) == 1) then
autoAssemble([[
aobscan(grenaderange, 00 00 B4 42 00 00 00 00 00 00 00 00 00 00 00 00)
label(_grenaderange)
registersymbol(_grenaderange)
grenaderange:
_grenaderange:
db FF E3 0B 54
]])
else
autoAssemble([[
_grenaderange:
db 00 00 B4 42
unregistersymbol(_grenaderange)
]])
end
end |
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25287 Location: The netherlands
|
Posted: Sat Feb 21, 2015 3:58 pm Post subject: |
|
|
make sure that lua script has executed before you toggle the button. (and that the eventname function matches the function name)
If you don't execute the lua script before accessing the form, you'll get nil errors
hint: instead of UDF1.CEToggleBox1 you can use sender as well. e.g: if (sender.Checked) then ...
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
iGuzmonJ How do I cheat? Reputation: 0
Joined: 24 Oct 2014 Posts: 9
|
Posted: Sat Feb 21, 2015 4:24 pm Post subject: |
|
|
Sorry for wasting your time, it appears that i slightly spelled one of the functions wrong haha. Thank you anyways. Well since you're here now, could ya help me with this last thing? I took your example for the code to put for the custom crosshair.
Code: | h=createD3DHook()
p=createPicture()
p.loadFromFile([[C:\Users\iGuzmonJ\Desktop\KTng66gTq.png]])
t=h.createTexture(p)
s=h.createSprite(t)
s.x=-1
s.y=-1 |
Everything is typed right, i double checked this time xD. When i click execute, i get an error saying it can't open the file. Any ideas why?
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25287 Location: The netherlands
|
Posted: Sat Feb 21, 2015 4:32 pm Post subject: |
|
|
C:\Users\iGuzmonJ\Desktop\KTng66gTq.png really exists?
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
iGuzmonJ How do I cheat? Reputation: 0
Joined: 24 Oct 2014 Posts: 9
|
Posted: Sat Feb 21, 2015 4:44 pm Post subject: |
|
|
Yeah it does, was just too lazy to rename the file atm. I renamed it and still no success. I went to the properties for it copied the location of it also and pasted it. Still no results.
|
|
Back to top |
|
|
Bjarnevk How do I cheat? Reputation: 0
Joined: 11 Feb 2015 Posts: 1
|
Posted: Mon Feb 23, 2015 8:11 am Post subject: |
|
|
Where is the source file saved of your script?
What I do is, put the picture in the same directory as the script and do
p.loadFromFile([[KTng66gTq.png]])
|
|
Back to top |
|
|
|