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 


Calling Lua from AA with multiple parameters

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

Joined: 22 Oct 2014
Posts: 49

PostPosted: Sat Nov 15, 2014 1:41 pm    Post subject: Calling Lua from AA with multiple parameters Reply with quote

So I'm attempting to call readRegionFromFile in an AA script. I've imported the lua template, but the example call there only uses a single integer variable. Could somebody explain to me how I would make a lua call with two variables, a string and an int? Thanks!
_________________
A guy who likes memory hacking.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Sat Nov 15, 2014 2:12 pm    Post subject: Reply with quote

Are you asking how to pass parameters to a lua function?

And do you really need to call it from inside the game in a code injection?
If not you do not use the lua template and just use luacall or a {$lua} section

_________________
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


Last edited by Dark Byte on Sat Nov 15, 2014 2:15 pm; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
BanCheese
Cheater
Reputation: 0

Joined: 22 Oct 2014
Posts: 49

PostPosted: Sat Nov 15, 2014 2:13 pm    Post subject: Reply with quote

Yes, I am. I'd assume you'd just push multiple parameters onto the stack, and a string would be a pointer, but in what order?
_________________
A guy who likes memory hacking.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Sat Nov 15, 2014 2:19 pm    Post subject: Reply with quote

If you insist on using the lua template and want more than 1 parameter, then set asside a block of memory for the parameters (e.g ebp-xxx) and then pass the address of that block to the function. You can then use readInteger and the likes to read the different parameters

But again, are you sure luacall or {$lua} isn't better?

_________________
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
View user's profile Send private message MSN Messenger
BanCheese
Cheater
Reputation: 0

Joined: 22 Oct 2014
Posts: 49

PostPosted: Sat Nov 15, 2014 2:25 pm    Post subject: Reply with quote

Alright -- I suppose you're right. Where can I find some documentation on luacall? I searched the wiki and did a quick google search, but I couldn't find anything. Or is it simply just lucall(luastuffhere)? Thanks for all of the help, I really appreciate it!


EDIT: I managed to find one of your previous posts, and I think it'll work. Thanks!

_________________
A guy who likes memory hacking.
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 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