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 


Question About Combine Strings

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
keepstill
Newbie cheater
Reputation: 0

Joined: 22 May 2020
Posts: 16

PostPosted: Sun May 09, 2021 9:39 am    Post subject: Question About Combine Strings Reply with quote

Hey, I need help about combine strings.

I want to reach a variable with combined variables.

Best regards.

Code:

Edit1 = "edit1blabla..."

number=1
--I want to do like the next line but it doesn't work
print(Edit[number])


 
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 95

Joined: 06 Jul 2014
Posts: 3082

PostPosted: Sun May 09, 2021 11:01 am    Post subject: Reply with quote

Code:
print(_ENV["Edit"..number])

You should probably be using a Lua array or CE strings object.
Code:
edit = {}
edit[1] = "edit1blabla"
print(edit[1])

_________________
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
keepstill
Newbie cheater
Reputation: 0

Joined: 22 May 2020
Posts: 16

PostPosted: Sun May 09, 2021 4:43 pm    Post subject: Reply with quote

ParkourPenguin wrote:
Code:
print(_ENV["Edit"..number])

You should probably be using a Lua array or CE strings object.
Code:
edit = {}
edit[1] = "edit1blabla"
print(edit[1])


Thank you very much Very Happy
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