Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Issue between encode\decode function and negative numbers

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
st_of_dec
Newbie cheater
Reputation: 0

Joined: 04 Jan 2018
Posts: 10
Location: AUS

PostPosted: Fri Mar 15, 2019 12:54 am    Post subject: Issue between encode\decode function and negative numbers Reply with quote

Hey guys,

last time I posted a question about how to encode my script and finally got solved with this thread.

Thread ID is 609124, I can not post url yet ...

Later another problem came out. I found that when I replace those two dll file, my script somehow could not output negative numbers.
Here are some examples.

Code:

local t = {-2341,34132,-13}
local t2 = {a = 1, b = {c = -312.000,d = -4222}}
local t3 = {a = 1, b = {c = -312.100,d = -4222.9898977}}
print(t[1])
print(t2.b.c)
print(t3.b.c)
print(t3.b.d)

--2341, supposed to be negative
--312, supposed to be negative
---312.1
---4222.9898977



Result will show negative numbers only when numbers after "." are valid.
This will not happen if I used original dll file, but I still want to use encode/decode function.
Plz solve this problem? Razz

Regards.

_________________
gta5 creator st_of_dec
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites