Back2Storymode How do I cheat? Reputation: 0
Joined: 15 May 2021 Posts: 1
|
Posted: Sat May 15, 2021 2:35 am Post subject: New to scripting, what is the problem with this sctipt? |
|
|
I've been trying to convert an AutoAssembly script to a lua one, so that I could run it with the generic trainer from the generic trainer generator, upon inspection, it looks fine to me (I have extremelly poor coding skills, this is acually a thing I've been doing to learn) but whenever I try to run it I get an error that says: [string "{$lua}..."]:1: unexpected symbol near '{'
this has been bugging me a lot, even if that is deleted (whole first lines) everything seems to be unexpected, I am fully aware this has to do with my own inhability to work around these kinds of tools and that the mistake is mine, but I am too new to this to understand what went wrong. help is appreciated, this is the code:
Code: |
{$lua}
if syntaxcheck then return end
[ENABLE]
scan = AOBScan("01 02 EB 10 DD 43 08")[0]
registerSymbol("roomcontrol",scan)
mem = allocatememory(0x1000)
registerSymbol("newmem",mem)
label(return)
newmem:
add [edx],#-1
jmp SPOOKY.exe+14CF5B
fld qword ptr [ebx+08]
jmp return
roomcontrol:
jmp newmem
nop 2
return:
autoAssemble([[
label(return)
newmem:
add [edx],#-1
jmp SPOOKY.exe+14CF5B
fld qword ptr [ebx+08]
jmp return
roomcontrol:
jmp newmem
nop 2
return:
]])
[DISABLE]
writeBytes(scan, 0x01, 0x02, 0xEB, 0x10, 0xDD, 0x43, 0x08)
unregisterSymbol("newmem")
unregisterSymbol("roomcontrol")
deAlloc(mem,0x1000)
scan = nil
mem = nil
|
Also, most codes from downloaded trainers tend to fail too, even if they worked once before, and the game hasn't had any updates for years, so it can't be a patch. I also verified that the trainers were using permanent adresses, which still work.
_________________
I am afraid of clowns |
|