SA-MP Forums Archive
Integer - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Integer (/showthread.php?tid=281733)



Integer - Wesley221 - 07.09.2011

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