View previous topic :: View next topic |
Author |
Message |
Sloster How do I cheat? Reputation: 0
Joined: 15 Mar 2017 Posts: 1 Location: Dubai
|
Posted: Tue Apr 18, 2017 7:07 am Post subject: HELP |
|
|
I was trying to paste a lua script when I realised I am literally unable to make or paste scripts as I get "unexpected symbol near '(whatever is put on the first line)'" no matter what I do, literally NOTHING works, please tell me what I'm doing wrong
|
|
Back to top |
|
|
FreeER Grandmaster Cheater Supreme Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
Posted: Tue Apr 18, 2017 7:56 am Post subject: |
|
|
if you're using Cheat Engines auto assembler scripts note that by default they expect a script in assembly not lua and you have to use to switch the parser, eg.
Code: |
[ENABLE]
// switch to lua parser
{$lua}
-- lua code goes here
...
-- switch back to assembly parser
{$asm}
// possible assembly code here
[DISABLE]
// possible assembly code here
|
note that lua code runs before the asm code, right after you activate the script, if you return a string in the lua section it will be parsed as assembly code as if you had written it in the auto assembly script
example with code
Code: |
[ENABLE]
{$lua}
return [[400290: // a code cave in the i386 3.3 tutorial process
db ]] .. ("90 "):rep(10)
-- should return, and thus assemble
-- 400290: // a code cave in the i386 3.3 tutorial process
-- db 90 90 90 90 90 90 90 90 90
{$asm}
[DISABLE]
|
The lua parser does understand the [ENABLE] and [DISABLE] lines/flags so if your entire script is lua you can just use {$lua} at the top without worrying about it.
Also note that CE will attempt to run any lua code in the script when you click "OK" to save the script, you may need to use Code: | if syntaxcheck then return end | somewhere in your script (probably near the top) to prevent that when CE is running the script purely to check it's syntax (syntaxcheck will be true in that case, and false otherwise).
Beyond that.... I don't have any ideas off the top of my head just from what info you've given.
|
|
Back to top |
|
|
|