View previous topic :: View next topic |
Author |
Message |
dadajszen Cheater Reputation: 0
Joined: 19 Sep 2013 Posts: 27
|
Posted: Wed Apr 08, 2015 1:03 pm Post subject: LUa - TRAINER |
|
|
Hi, I have a LUa code:
Code: | UDF1.OnClose = function(sender) closeCE() return caFree end
mrMiny = getAddressList().getMemoryRecordByDescription('Miny')
function CEButton1Click(sender)
mrMiny.Value = mrMiny.Value + 10
if not mrMiny.Active then mrMiny.Active = true end
end
form_show(UDF1)
strings_add(getAutoAttachList(), "MineSweeper") |
I have problem
Code: | Error:[string "UDF1.OnClose = function(sender) closeCE() r..."]:5: attempt to perform arithmetic on field 'Value' (a string value) |
someone help me convert it to make it so that I press my button and changes the value e. g. , for 9999? I would be very grateful
|
|
Back to top |
|
|
atom0s Moderator Reputation: 198
Joined: 25 Jan 2006 Posts: 8516 Location: 127.0.0.1
|
Posted: Wed Apr 08, 2015 3:18 pm Post subject: |
|
|
Try this:
Code: | mrMiny.Value = tostring(tonumber(mrMiny.Value) + 10); |
_________________
- Retired. |
|
Back to top |
|
|
dadajszen Cheater Reputation: 0
Joined: 19 Sep 2013 Posts: 27
|
Posted: Mon Apr 13, 2015 1:54 pm Post subject: |
|
|
Error:[strin "UDF1.OnClose=function(sender) closeCE() r..."]:1:attempt to index global 'UDF1' ( a nil value)
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Mon Apr 13, 2015 3:21 pm Post subject: |
|
|
what name did you give your form? (Assuming you made one)
_________________
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 |
|
|
dadajszen Cheater Reputation: 0
Joined: 19 Sep 2013 Posts: 27
|
Posted: Tue Apr 14, 2015 9:48 am Post subject: |
|
|
Still the same Error: [string "UDF1. OnClose = function (sender) closeCE () r. . . "]: 5: attempt to perform arithmetic on field ' value ' (a string value)
My LUA:
Code: | UDF1.OnClose = function(sender) closeCE() return caFree end
mrMiny = getAddressList().getMemoryRecordByDescription('Miny')
function ButtonClick(sender)
mrMiny.Value = mrMiny.Value + 10
if not mrMiny.Active then mrMiny.Active = true end
end
form_show(UDF1)
strings_add(getAutoAttachList(), "MineSweeper") |
Miny - ITS MY POINTER
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Tue Apr 14, 2015 9:58 am Post subject: |
|
|
mrMiny.Value = tonumber(mrMiny.Value) + 10
_________________
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 |
|
|
|