"Class" Result is nil???

All discussions & material related to Command's Lua interface

Moderators: angster, RoryAndersonCDT, michaelm75au, MOD_Command

Post Reply
User avatar
vettim89
Posts: 3668
Joined: Fri Jul 13, 2007 11:38 pm
Location: Toledo, Ohio

"Class" Result is nil???

Post by vettim89 »

I know this is such a simple and stupid question but I cannot figure it out

When I run the following code in the console, it returns nil

Code: Select all

ship=ScenEdit_GetUnit({side='USSR', name='BPK Simferopol', guid='IE6M5H-0HNBL68LGL15D'})
print (ship.class)
If I print ship.name, it returns "SImferopol". Same for side, guid, etc. Am I using the wrong word for "class"
"We have met the enemy and they are ours" - Commodore O.H. Perry
User avatar
vettim89
Posts: 3668
Joined: Fri Jul 13, 2007 11:38 pm
Location: Toledo, Ohio

Re: "Class" Result is nil???

Post by vettim89 »

Thanks. I knew the answer was simple :oops:
"We have met the enemy and they are ours" - Commodore O.H. Perry
Post Reply

Return to “Lua Legion”