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 


Some questions..

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Fri May 03, 2013 4:38 pm    Post subject: Some questions.. Reply with quote

Well I got couple of questions.
1. I got this to create some form with memo and etc.
Code:

f     = {}
f[1]  = createForm()
f[2]  = createPanel(f[1])
f[3]  = createMemo(f[2])
f[4]  = createMemo(f[2])
f[5]  = createButton(f[2])
f[6]  = createButton(f[2])
f[7]  = createButton(f[2])

Is it possible for me to print the arrays of 'f' and what object they hold?

2. The LUA command
Code:
resetLuaState()

I have this situation:
I have a 2 forms.

1 is login form
2 is Running tests form

I do this (example ofcourse)
Code:
form_hide(t)
form_hide(f)
resetLuaState()
http = require("socket.http")
a, b = http.request("http://somewebsite.com/example.php","Login")
loadstring(a)()

The above hides the tests form and login form, calls resetLuaState() and then loads again the Login form and executes.
But when I try to Login, (executes some functions in the the loadedstring(a))
I get this kind of error
Code:
Error:attempt to call a nil value


So my question.
Why after loadstring, the loaded lua file don't override the current functions in the trainer itself?
(a = website the file location, b = the post data which returns the .lua file).

_________________
I'm rusty and getting older, help me re-learn lua.


Last edited by daspamer on Fri May 03, 2013 5:13 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Fri May 03, 2013 4:54 pm    Post subject: This post has 2 review(s) Reply with quote

Your first question can be done using:
Code:
for k, v in pairs( f ) do
    print( object_getClassName( v ) );
end


Your second question isn't that clear. Without knowing what a is, we can't really help given that you are executing a string which could have the error in it.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Fri May 03, 2013 5:01 pm    Post subject: Reply with quote

Wiccaan wrote:
Your first question can be done using:
Code:
for k, v in pairs( f ) do
    print( object_getClassName( v ) );
end


Your second question isn't that clear. Without knowing what a is, we can't really help given that you are executing a string which could have the error in it.

You got skype?
If so please PM me, I will tell& show you what I use&got.

Edit:
Is it possible to print the array definition too?
like
f[1]
f[2.1]
f[21]
and etc.
so result will be for example
f[1] TCEForm

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Fri May 03, 2013 5:44 pm    Post subject: Reply with quote

k is the key, just print that too.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Fri May 03, 2013 6:00 pm    Post subject: Reply with quote

Thanks!
Code:
for k, v in pairs( f ) do
print("acp["..k.."]")
    print( object_getClassName( v ) );
end

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
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