It is currently October 24th, 2018, 1:55 am

Lua for me.

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

Re: Lua for me.

kyriakos876 » September 29th, 2018, 6:10 pm

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: 18161
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Lua for me.

jsmorley » September 29th, 2018, 6:50 pm

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: 729
Joined: January 30th, 2017, 2:01 am

Re: Lua for me.

kyriakos876 » September 29th, 2018, 7:06 pm

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...