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 


Not all instructions could be injected... [Closed]

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
paul44
Expert Cheater
Reputation: 2

Joined: 20 Jul 2017
Posts: 152

PostPosted: Wed Sep 01, 2021 1:00 am    Post subject: Not all instructions could be injected... [Closed] Reply with quote

some info: [ https://imgur.com/a/clibQqc ]

I started to receive this error pretty early on in dev_stage... As soon as i run the 1st 'Run xxxx' script in the table, it will return this error. However: sofar it does seem to execute everything just fine?! But obviously like to get this removed/solved.
The 2nd image shows the contents of the 1st 'Run xxxx' script, but no matter which script I run (apart from the 'info' & 'param' one), it will "hit" all of them thereafter...

btw: searching for possible remedies, one post mentions a mem_related issue (alloc not properly defined). also tried to pinpoint possible error_location with some prints, but no cigar...

Need more info/details: just ask !

ps:
a. the 'Parametrization' just initializes the proper vars (~ globalalloc's - also tried to replace them with alloc's)
b. the table uses the Lua startup script, containing some "global" routines (+ some stuff to build the gui ~ which does not relate to this error; already got the error prior to "inserting" the gui)


Last edited by paul44 on Wed Sep 01, 2021 4:57 am; edited 1 time in total
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4290

PostPosted: Wed Sep 01, 2021 1:55 am    Post subject: Reply with quote

I didn't look at your code for that long, might be missing something.

You have a random "test al,al" instruction at the end of the {$lua} block with nothing else defining where it should be written to.

I don't see that {$lua} block return any string, so you should also have "if syntaxcheck then return end" at the start of that {$lua} block. Otherwise it'll be run twice if you fix the previous syntax error of "test al,al"

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
paul44
Expert Cheater
Reputation: 2

Joined: 20 Jul 2017
Posts: 152

PostPosted: Wed Sep 01, 2021 4:57 am    Post subject: i am an idio... Reply with quote

that was actually the reason: 'test al,al'

where this comes from ?: [ https://forum.cheatengine.org/viewtopic.php?t=606629&sid=a916286c92a67f30f387a6ab1744d544 ]

I never had any problems with it (since only using in Help functions); so did not realize it returned that error (just double-checked a "live" table, and indeed...)

ps: "Otherwise it'll be run twice..." - i assume this happens [b]only[/b] when editing the script, not when 'enabling' it ?!

btw: tried 'error()' suggestion, but this gives me a syntax error...

anyways: topic closed (and sorry for not having noticed this myself)
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4290

PostPosted: Wed Sep 01, 2021 11:38 am    Post subject: Reply with quote

paul44 wrote:
ps: "Otherwise it'll be run twice..." - i assume this happens only when editing the script, not when 'enabling' it ?!

Try experimenting with this:
Code:
{$lua}
[ENABLE]
print("ENABLED:  syntaxcheck",tostring(syntaxcheck))
[DISABLE]
print("DISABLED: syntaxcheck",tostring(syntaxcheck))

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
paul44
Expert Cheater
Reputation: 2

Joined: 20 Jul 2017
Posts: 152

PostPosted: Thu Sep 02, 2021 10:57 am    Post subject: syntaxcheck... Reply with quote

I assume you'd like to know how many times it "reports":

a) press [OK] to finish editing: both return 'true' (with and without test instruction)
b) with test instruct: only 'enabled' giving 'false'
c) with test~alloc(newmem): 'enabled/disabled' return 'false' (and no errors in this case, but no auto-disable either of course)

iow: in both cases, it would run only once per 'click'

that said: either i follow suggestions from other topic (basically use a timer), or stick with what i have now. and since this table is 'Tablemakers only' - and i now know where the error comes from - i leave things until something more elegant falls out of the closet...
cheers
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