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 


error in script

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

Joined: 26 Oct 2021
Posts: 16

PostPosted: Wed Oct 27, 2021 4:49 am    Post subject: error in script Reply with quote

he writes to me about an error

Error:[string "function UDF1_CEButton1Click(sender)
..."]:18: attempt to compare string with number


my code

function UDF1_CEButton1Click(sender)
local Z = ("09A3E318")
repeat
writeInteger("09A3E318",35128361)
writeInteger("09A3E318",39453468)
sleep (50)
writeInteger("09A3E318",46006982)
sleep (50)
writeInteger("09A3E318",43319922)
sleep (50)
writeInteger("09A3E318",36962807)
sleep (50)
writeInteger("09A3E318",41288068)
sleep (50)
writeInteger("09A3E318",36111000)
sleep (50)
writeInteger("09A3E318",35128361)
until Z <= 10
end


how do I fix it?
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater
Reputation: 5

Joined: 02 Sep 2011
Posts: 537
Location: 0x90

PostPosted: Wed Oct 27, 2021 5:24 am    Post subject: Reply with quote

Firstly, use code tags if you're posting code. Secondly, your variable Z is a string ("09A3E318") which you are comparing against an integer (until Z <= 10). You will want to read the value held at the address using the functions I mentioned in your other thread.
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