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 


Why won't this script work?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
The Dab
Cheater
Reputation: 0

Joined: 22 May 2017
Posts: 33

PostPosted: Mon Jun 26, 2017 5:39 pm    Post subject: Why won't this script work? Reply with quote

What I am trying to do is simply auto assemble my script when I toggle on the toggle box. I am getting no errors in the lua script, and my auto assemble script works 100% fine when I toggle it in the cheat table.I did not change the names of anything in the trainer. It's just the button will not toggle the script and I do not know why. I am very new to lua sorry if this is a dumb question.

Code:

form_show(UDF1)
getAutoAttachList().add("Pinball.exe")

function CloseClick()
  closeCE()
  return caFree
end

UDF1.OnClose = CloseClick

addresslist=getAddressList()

function CEToggleBox1Change(sender)
  if (checked_getState(UDF1.CEToggleBox1) == 1) then
autoAssemble([[
aobscan(score,48 89 81 68 01 00 00 48 3D)
alloc(newmem,$1000,7FF9C41F83C6)
label(code)
label(return)
newmem:
code:
  mov [rcx+00000168],rax
  add [rcx+00000168],(int)5000000
  jmp return
score:
  jmp newmem
  nop
  nop
return:
registersymbol(score)
]])
  else
autoAssemble([[
score:
  db 48 89 81 68 01 00 00
unregistersymbol(score)
dealloc(newmem)
]])
  end
end

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