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 


Apostrophe in table?

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

Joined: 17 Jan 2018
Posts: 205

PostPosted: Fri Apr 19, 2019 12:57 pm    Post subject: Apostrophe in table? Reply with quote

How to use the apostrophe in the table? The following code does not work:
Code:
local t = { [0x000]= 'Potion', [0x00A]= 'God's Hand'}
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Fri Apr 19, 2019 3:09 pm    Post subject: Reply with quote

Code:

local t = { [0x000]= 'Potion', [0x00A]= "God's Hand"}

_________________
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
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8585
Location: 127.0.0.1

PostPosted: Fri Apr 19, 2019 4:48 pm    Post subject: Reply with quote

You can also escape the character using a backslash like:
Code:

local t = { [0x000]= 'Potion', [0x00A]= 'God\'s Hand'}

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Razi
Expert Cheater
Reputation: 1

Joined: 17 Jan 2018
Posts: 205

PostPosted: Sat Apr 20, 2019 2:33 am    Post subject: Reply with quote

Tried it many times with this methods,
Code:
local t = { [0x000]= 'Potion', [0x00A]= "God's Hand"}
local t = { [0x000]= 'Potion', [0x00A]= 'God\'s Hand'}
local t = { [0x000]= 'Potion', [0x00A]= [[God's Hand]]}
local t = { [0x000]= 'Potion', [0x00A]= 'God"s Hand'}

but the program constantly gives an error. The error was that the Name of the object was renamed, not the Caption of the object. Thanks for answer.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Sat Apr 20, 2019 2:42 am    Post subject: Reply with quote

try 0x000 instead of [0x000] (etc...)

also check the rest of your code

_________________
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
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1668

PostPosted: Sat Apr 20, 2019 5:53 am    Post subject: Reply with quote

As DB said. it use for items list :

Code:
0x00 = Potion, 0x9E = God's Hand,...etc


and note for this game :

String values end with a 0xFF byte Also, LOWERCASE characters in the game are represented by UPPERCASE ASCII codes in the savegame.

And for the UPPERCASE and other characters, the following codes are used:

0x21 = A, 0x22 = B, 0x23 = C... etc
0x10 = 1, 0x11 = 2, 0x12 = 3... etc
0x00 = Space

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
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