Game Development Community

TGB validating GuiTextEditCtrl

by Joseph Bosch · in Torque Game Builder · 09/04/2011 (12:29 pm) · 1 replies

Backdrop: attempting to enforce numerical input in GuiTextEditCtrl


I have read several forums which suggest a couple of different methods none of which work

method A

the validate field

http://www.garagegames.com/community/forums/viewthread/6940
suggests to add a function to the input field

I tried to add “validateInput();” to the field but it does not do any thing

similarly trying this function in the command field does not work either

per the recommendations of the forum above I put the command in common\gameScripts\client

does any body have any suggestions for getting this function to run so I can validate input?

#1
09/04/2011 (1:06 pm)
ok moving the function to my player movment controll gets the function called but.
i get
ame/behaviors/Player_Movment.cs (213): Unable to find object: '' attempting to call function 'getValue
echo("client cs line 62");
%value = %this.getValue()+1;
%min = %this.min + 1;
%max = %this.max + 1;
if (%min > %value)
{
%value = %min;
}
if (%max < %calue)
{
%bvalue = %max;
}