Problems with removeField
by John Coyne · in Torque Game Builder · 05/16/2006 (11:18 am) · 2 replies
Are there any known problems with the "removeField" command. I'm storing co-ordinates in a string with setField, and from what I see, removeField does nothing at all.
after adding 2 fields then attempting to delete 2 the console shows no change on deleting.
function Slide::DeleteNextPoint(%this)
{
echo("delete next point called");
echo("Delete called on " @ getField(%this.slidePath, (getFieldCount(%this.slidePath)-1)));
removeField(%this.slidePath, (getFieldCount(%this.slidePath)-1));
}
function playerUp()
{
$slide.AddToEnd("0 0");
$slide.dumpSlide();
}
function playerDown()
{
$slide.deleteNextPoint();
$slide.dumpSlide();
}after adding 2 fields then attempting to delete 2 the console shows no change on deleting.
**Dumping slide data** Count = 0 Field = 0 0 **End slide data dump** **Dumping slide data** Count = 0 Field = 0 0 Count = 1 Field = 0 0 **End slide data dump** delete next point called Delete called on 0 0 **Dumping slide data** Count = 0 Field = 0 0 Count = 1 Field = 0 0 **End slide data dump** delete next point called Delete called on 0 0 **Dumping slide data** Count = 0 Field = 0 0 Count = 1 Field = 0 0 **End slide data dump**
About the author
Torque 3D Owner Luke D
Default Studio Name