Posted: Sat Jun 18, 2016 4:29 pm Post subject: Attempt to call a nil value in Cheat Table
Hey!
I have a problem creating my trainer.
When I add a timer which writes the value of an address to a label, everything is okay at first. But when I reopen my cheat table, an error pops up "Error:attempt to call a nil value". And again and again and again (maybe because the timer is trying to call an address already?). Because of this I barely can go to UDF1 -> Edit.
But when I am in the "editing" windows, the error does not pop up anymore.
The timer is on 1000ms. onTimer:
Code:
function CETimer1Timer(sender)
UDF1.CELabel2.Caption = getAddressList().getMemoryRecordByDescription("HealthOfSomething").Value:match("^%d+") or "???"
end
cooleko: if that were the case, the error would be "attempt to index a nil value".
In the Lua engine window, deselect View -> Show on "print" and it won't bring that window to the foreground every time something new is printed to it.
Your problem is probably because the function CETimer1Timer isn't defined. You need to make sure the Lua script is executed when you open the cheat table. By default, it should ask you if you want to run it or not. If it doesn't, run it yourself. You can configure the default behavior in the general settings. _________________
I don't know where I'm going, but I'll figure it out when I get there.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum