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 


Nesting (Syntax scripting) CE 6.6 vs CE 6.4

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

Joined: 10 Apr 2015
Posts: 1668

PostPosted: Fri Dec 23, 2016 9:37 am    Post subject: Nesting (Syntax scripting) CE 6.6 vs CE 6.4 Reply with quote

Hi,

Let say i have data array like this :

Code:
aob_table = {}
aob_table[1] = 'AA BB'
aob_talbe[2] = 'BB CC'
aob_table[3] = 'DD EE '
aob_table[4] = 'FF GG '
aob_table[5] = 'HH II '
aob_table[6] = 'JJ KK '

function doing_hacks()
doing =
{

{'Hack 1',[[Luacall(scan(aob_table[1],aob_table[2]))
{'Hack 2',[[Luacall(scan(aob_table[3],aob_table[4]))]]},
{'Hack 3',[[Luacall(scan(aob_table[5],aob_table[6]))

}
end

--- Function 'scan' has made in other function



This script above work in CE 6.6 but when try in CE 6.4
it's gave error "13:nesting of [[..]] is deprecated near '[')"

What different in script syntax specially for nesting to make that script above work in CE 6.4 ?.

Is there any scripting rules references using in CE 6.4 vs CE 6.6 ?
or maybe must read completely about scripting in Lua 5.1 vs Lua 5.3

Thank
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Fri Dec 23, 2016 9:58 am    Post subject: Reply with quote

You just need to write your code more carefully.
Code:
aob_table = {}
aob_table[1] = 'AA BB'
aob_table[2] = 'BB CC'
aob_table[3] = 'DD EE '
aob_table[4] = 'FF GG '
aob_table[5] = 'HH II '
aob_table[6] = 'JJ KK '

function doing_hacks()
doing =
{

{'Hack 1',[[Luacall(scan(aob_table[1],aob_table[2]))]]},
{'Hack 2',[[Luacall(scan(aob_table[3],aob_table[4]))]]},
{'Hack 3',[[Luacall(scan(aob_table[5],aob_table[6]))]]}

}
end

--- Function 'scan' has made in other function
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1668

PostPosted: Fri Dec 23, 2016 6:25 pm    Post subject: Reply with quote

Ah, I see. Script fixed and work also in CE 6.4

Thank a lot Zanzer
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