Integer
#1

How can i check if an integer is empty in this piece of code:
pawn Код:
if( !sscanf(params, "iii", vModel, vColor1, vColor2) )
        {
            if( !strlen(vModel) ) return SendClientMessage(playerid, -1, " ** You have to type the vehicle model in order to create a vehicle. ");
            if( !strlen(vColor1) ) return SendClientMessage(playerid, -1, " ** You have to type the vehicle color (1) in order to create a vehicle. ");
            if( !strlen(vColor2) ) return SendClientMessage(playerid, -1, " ** You have to type the vehicle color (2) in order to create a vehicle. ");
        }
I tried it with strlen, but that gave me errors. Also i tried isnull, but that gave me errors aswell.
Код:
//strlen errors:
error 035: argument type mismatch (argument 1)
error 035: argument type mismatch (argument 1)
error 035: argument type mismatch (argument 1)

//isnull errors:
error 028: invalid subscript (not an array or too many subscripts): "vModel"
error 029: invalid expression, assumed zero
error 028: invalid subscript (not an array or too many subscripts): "vModel"
fatal error 107: too many error messages on one line
~Wesley
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)