StringTableEntry
by Toks · in Torque Game Engine · 09/03/2007 (10:11 am) · 1 replies
Hey can someone help me explain StringTableEntry? i couldnt find any documentation on it. im trying to use it to load a dts in quite exactly the same way that is used in game/shapeImage.cc:
first i declare a StringTableEntry tpShapeName.
then in ShapeBaseImageData() I initialized: tpShapeName = "";
and in initPersistFields() I added:
addField("tpShapeFile", TypeFilename, Offset(tpShapeName, ShapeBaseImageData));
and finaly i wrote it to and read it from the bitstream.
then when i go in preload() the following happens:
i added in an if statement right before the one regarding the shapeName StringTableEntry:
if (tpShapeName && tpShapeName[0])
{...}
else
{...} whereas shapeName does exactly the same but only with shapeName and shapeName[0]...
I had assumed that the [0] was somehow handled by StringTableEntry, since i dont see it being set anywhere for other StringTableEntries either, however when i have this printed, tpShapeName has a value, but tpShapeName[0] == 0.
first i declare a StringTableEntry tpShapeName.
then in ShapeBaseImageData() I initialized: tpShapeName = "";
and in initPersistFields() I added:
addField("tpShapeFile", TypeFilename, Offset(tpShapeName, ShapeBaseImageData));
and finaly i wrote it to and read it from the bitstream.
then when i go in preload() the following happens:
i added in an if statement right before the one regarding the shapeName StringTableEntry:
if (tpShapeName && tpShapeName[0])
{...}
else
{...} whereas shapeName does exactly the same but only with shapeName and shapeName[0]...
I had assumed that the [0] was somehow handled by StringTableEntry, since i dont see it being set anywhere for other StringTableEntries either, however when i have this printed, tpShapeName has a value, but tpShapeName[0] == 0.
Torque Owner Toks