Nihongo^

  • Full Member
  • Posts: 153

!

  • Sr. Member
  • Don't feel shy while zooming on h*r...
  • Posts: 377
Re: Property system bug
« Reply #2,  »
Use IsNum( arg )
Code: [Select]
if ( !IsNum( text ) ) return print( "Error >> Expected an integer." );


typeof
It returns the name of type to which the passed argument belongs.

Nihongo^

  • Full Member
  • Posts: 153
Re: Property system bug
« Reply #3,  »
Hi thanka for your kind reply
I am sorry I am noon in scripting just started recently
 I replace it with numtok kindly check the code o think I did it wrong can u correct it if you don't mind

else if( typeof( IsNum( text, " ", 1 ).tointeger() ) != "integer" ) return pMSG( "Error - Usually 'price' means numbers...", player );

!

  • Sr. Member
  • Don't feel shy while zooming on h*r...
  • Posts: 377
Re: Property system bug
« Reply #4,  »
Quote from Nihongo^ on September 16th, 05:30 PM
Hi thanka for your kind reply
I am sorry I am noon in scripting just started recently
 I replace it with numtok kindly check the code o think I did it wrong can u correct it if you don't mind

else if( typeof( IsNum( text, " ", 1 ).tointeger() ) != "integer" ) return pMSG( "Error - Usually 'price' means numbers...", player );
Correct
Code: [Select]
else if( !IsNum( GetTok( text, " ", 1 ) ) ) return pMSG( "Error - Usually 'price' means numbers...", player );