View previous topic :: View next topic |
Author |
Message |
RandName Newbie cheater Reputation: 0
Joined: 19 Jun 2015 Posts: 22
|
Posted: Fri Jun 19, 2015 4:11 pm Post subject: Cheat Engine Pure 15.06.10 bug? |
|
|
Hi,
I have recently downloaded mgr.inz.Player's version of cheat engine (version is in title).
I think it is the latest one (based on the date).
But I have encountered a bug.
Whenever I try to use a method from the math library like math.pow(),
I get an error saying that I am trying to call a nil value.
This is the exact error message:
Code: |
Error:[string "print(math.pow(2,2))
..."]:1: attempt to call a nil value (field 'pow')
Script Error
|
You can download the version from the link in his signature.
(Can't post links yet)
I don't know why, but it worked in the official release.
Can someone help me with this?
|
|
Back to top |
|
|
panraven Grandmaster Cheater Reputation: 55
Joined: 01 Oct 2008 Posts: 942
|
Posted: Fri Jun 19, 2015 11:47 pm Post subject: |
|
|
Use 2^2 (__pow metamethod) ,
math.pow is deprecated or removed in lua 5.3, new ce use 5.3.
(this should move to beta forum?)
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Sat Jun 20, 2015 2:48 am Post subject: |
|
|
i'll see about manually adding math.pow (and other stuff) as this breaks compatibility with older scripts
e. g loadstring seems to be deprecated as well, and i know some greedy/selfish people that use it
_________________
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 |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sat Jun 20, 2015 5:30 am Post subject: |
|
|
By the way, Lua 5.3.1 has been released three days ago.
And here http://www.lua.org/bugs.html , they said that string.format("%f") can cause a buffer overflow (only when 'lua_Number' is long double!)
_________________
Last edited by mgr.inz.Player on Sat Jun 20, 2015 7:02 am; edited 1 time in total |
|
Back to top |
|
|
RandName Newbie cheater Reputation: 0
Joined: 19 Jun 2015 Posts: 22
|
Posted: Sat Jun 20, 2015 6:59 am Post subject: |
|
|
panraven wrote: | Use 2^2 (__pow metamethod) ,
math.pow is in lua 5.3, new ce use 5.3.
(this should move to beta forum?) |
Hm, that's unfortunate because I used math.frexp() and math.ldexp() in my script to convert hex into float and vice versa.
I know that there is an easier method of converting these and I once saw it here somewhere, but I can't find it anymore.
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sat Jun 20, 2015 7:09 am Post subject: |
|
|
Code: |
function hextofloat(n)
return byteTableToFloat(dwordToByteTable(n))
end
function hextodouble(n)
return byteTableToDouble(qwordToByteTable(n))
end
print( hextofloat(0x3f800000) )
print( hextodouble(0x3ff0000000000000) )
|
_________________
|
|
Back to top |
|
|
RandName Newbie cheater Reputation: 0
Joined: 19 Jun 2015 Posts: 22
|
Posted: Sat Jun 20, 2015 7:14 am Post subject: |
|
|
mgr.inz.Player wrote: | Code: |
function hextofloat(n)
return byteTableToFloat(dwordToByteTable(n))
end
function hextodouble(n)
return byteTableToDouble(qwordToByteTable(n))
end
print( hextofloat(0x3f800000) )
print( hextodouble(0x3ff0000000000000) )
|
|
Ah, that's very helpful!
And the other way round?
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Sat Jun 20, 2015 7:18 am Post subject: |
|
|
byteTableToDword(floatToByteTable(floatvalue))
_________________
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 |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sat Jun 20, 2015 7:19 am Post subject: |
|
|
Code: | function floattohex(n)
return string.format('%X',byteTableToDword(floatToByteTable(n)))
end
function doubletohex(n)
return string.format('%X',byteTableToQword(doubleToByteTable(n)))
end
print( floattohex(1) )
print( doubletohex(1) ) |
EDIT:
also if you have hex value as a string
myhex= '3f800000'
print( hextofloat('0x'..myhex) )
_________________
|
|
Back to top |
|
|
RandName Newbie cheater Reputation: 0
Joined: 19 Jun 2015 Posts: 22
|
Posted: Sat Jun 20, 2015 7:24 am Post subject: |
|
|
works very well!
Thx again
EDIT:
If I am right, I can just use the integer representation as input for the float2hex function, right?
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sat Jun 20, 2015 8:05 am Post subject: |
|
|
yes
_________________
|
|
Back to top |
|
|
|