Game Development Community

Storing records/structures in arrays

by Mike Stoddart · in Torque Game Engine · 07/19/2002 (8:54 am) · 2 replies

I'm trying to do something like the following:

$Game::units[0].unitId = %unitId;

except when I try to print out:

echo ("Unit ID = " @ $Game::units[0].unitId);

It is always blank/empty. Is this not possible in the scripting language? Does the scripting language not support records/structures of any type?

Thanks

#1
07/19/2002 (9:13 am)
Try using $Game::units[0 @ unitId]
#2
07/19/2002 (11:42 am)
Thanks that works perfectly.