It is currently April 24th, 2024, 6:07 pm

Lua for me.

Discuss the use of Lua in Script measures.
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Lua for me.

Post by kyriakos876 »

raiguard wrote:Hmm, are you sure? I've never had any luck printing tables straight-up. That would certainly be interesting if it's possible.
Well I'm not SUREEEE but if you say it's not possible that's probably the case and I remember something wrong.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Lua for me.

Post by jsmorley »

You can't ever just print a table. A table is an "object" identified by a numeric reference. You have to extract the contents of a table and print that.

bad:
print (tableName)

good:
print (tableName['indexName'])
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Lua for me.

Post by kyriakos876 »

jsmorley wrote:You can't ever just print a table. A table is an "object" identified by a numeric reference. You have to extract the contents of a table and print that.

bad:
print (tableName)

good:
print (tableName['indexName'])
Ah, that explains why I remember an "if" loop being in the game...