removeFIeld() bugged
by Bryan "daerid" Ross · in Torque Game Engine · 04/22/2002 (10:53 pm) · 1 replies
here's some console code to demonstrate the problem:
It doesn't remove the field, it just sets it to "1" ?
Is that right? why?
==>echo( removeField( "Field1" TAB "Field2", 0 ) ); Field2 ==>echo( removeField( "Field1" TAB "Field2", 1 ) ); Field1^1
It doesn't remove the field, it just sets it to "1" ?
Is that right? why?
Torque 3D Owner Joel Baxter
To fix, have a look at removeUnit in consoleFunctions.cc. Where it has this:
if(!sz && !string[sz]) return ret;replace with this:if(string[sz] == 0) { // if that was the last... if(string != start) { ret[string - start - 1] = 0; // then kill any trailing delimiter } return ret; // and bail }I'll check to make sure this doesn't break existing uses of that code and then get it into the TGE head.