|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Wed Dec 27, 2017 4:51 pm Post subject: How to get "autoAssembleCheck" to check disable se |
|
|
So found this in the celua.txt file
Code: |
autoAssembleCheck(text, enable, targetself) : Checks the script for syntax errors. Returns true on succes, false with an error message on failure
|
Got it to check the Enable section but not the Disable, with these:
Code: |
autoAssembleCheck(fileStr)
autoAssembleCheck(fileStr, false)
autoAssembleCheck(fileStr, true)
local checkOk, errMsg = autoAssembleCheck(fileStr, disableInfo, targetSelf)
|
But matching the "autoAssemble" command I tried:
Code: |
local checkOk, errMsg = autoAssembleCheck(fileStr, targetSelf, disableInfo)
|
But that just got me an error sound like it was targeting it self and not finding the executable name in the script.
So is "enable" boolean or "disableInfo", and How do I get "autoAssembleCheck" to check disable section.
Or would I need to parse the string for the right section.
_________________
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Wed Dec 27, 2017 5:41 pm Post subject: |
|
|
autoAssembleCheck doesn't take disableInfo, as the check is only a syntax check (enable is a boolean)
e.g execute this code in lua engine and see that it checks the disable section
Code: |
s=[[
[enable]
00400500:
nop
nop
nop
[disable]
00400500:
something()
really-
stuipid
]]
return autoAssembleCheck(s,false)
|
as you see, it does check the code, and it will see that something() is not valid AA syntax
(It is exactly the same check as if you do file->assign to cheat table)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Wed Dec 27, 2017 6:41 pm Post subject: |
|
|
So tried your code and it worked.
but then messed around some more and figured out that if I give even a nil value for "targetSelf" then it doesn't check the Disable section from what I could tell.
So this code:
Code: |
s=[[
[enable]
00400500:
nop
nop
nop
[disable]
00400500:
something()
really-
stuipid
]]
return autoAssembleCheck(s,false,nil)
|
Gives me this output:
Code: |
s=[[
[enable]
00400500:
nop
nop
nop
[disable]
00400500:
something()
really-
stuipid
]]
return autoAssembleCheck(s,false,nil)
:true
|
_________________
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Wed Dec 27, 2017 7:34 pm Post subject: |
|
|
it's a bug yes, disable is ignored if targetself is filled in
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Wed Dec 27, 2017 7:53 pm Post subject: |
|
|
Ok, that's what I started to figure, just took out the "targetSelf" and it works fine.
So is there now or will there be a way to run the syntax check from say a text editor. Say with a file path and an "enable" argument.
But the syntax checker is plenty Awesome.
So, after looking a gift horse in the mouth, let me say thanks for being Awesome.
_________________
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Wed Dec 27, 2017 8:09 pm Post subject: |
|
|
Sure you can do that.
Just let your text editor connect to ce's lua engine and tell it to load the file after saving it and do a syntax check on it
You can talk to the ce lua pipe directly, or check out luaclient which is a wrapper for it.
Alternatively, perhaps lua has functionality to check for file dates, and if the last filedate has changed auto perform a check
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Wed Dec 27, 2017 8:56 pm Post subject: |
|
|
Well with sublime text, it has a basic build system, with Json syntax like:
Code: |
{
"working_dir": "C:\\Program Files (x86)\\RLWS\\iRev",
"cmd": [ "compile.exe", "$file" ],
"shell": true,
"selector": "source.iWrite",
}
|
Code: |
{
"target": "compile_papyrus_f4",
"cmd": "$file",
"file_regex": "(^.*\\.psc)\\(([0-9]*),([0-9]*)\\)",
"selector": "source.papyrusf4",
"variants":
[
{
"name": "PapyrusF4 - Release",
"target": "compile_papyrus_f4_release",
"cmd": "$file"
},
{
"name": "PapyrusF4 - Release Final",
"target": "compile_papyrus_f4_release_final",
"cmd": "$file"
}
]
}
|
But I think it could be done with some a Python extension in sublime text.
_________________
|
|
Back to top |
|
|
|
|
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
|
|