SA-MP Forums Archive
Invaild Vehicle ID sscanf - 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: Invaild Vehicle ID sscanf (/showthread.php?tid=364458)



Invaild Vehicle ID sscanf - mrsamp - 30.07.2012

I'll post the whole command also I'm not so sure it it's working either
Код:
YCMD:delcar(playerid, params[], help)
{
		if(P_Data[playerid][pAdmin] < 2) return SCM(playerid, COLOR_RED, "You aren't admin!");
		new
		    vehicleid,string[128];
		if(sscanf(params, "i", vehicleid)) return SCM(playerid, COLOR_RED, "Usage: /delcar [vehicleid[");
		if(vehicleid == INVAILD_VEHICLE_ID) return SCM(playerid, COLOR_RED, "Wrong vehicleid");
		format(string, sizeof(string), "You deleted vehicle id: %i", vehicleid);
		SCM(playerid, -1,string);
		DestroyVehicle(vehicleid);
 		return 1;
}
Код:
C:\Users\Andreas\Desktop\SA-MP Server NEW\filterscripts\Admin_System.pwn(681) : error 017: undefined symbol "INVAILD_VEHICLE_ID"
I tried with IVI it's working with IPI (INVAILD_PLAYER_ID) Help? i saw someone make a command with INVAILD_VEHICLE_ID


Re: Invaild Vehicle ID sscanf - SomebodyAndMe - 30.07.2012

pawn Код:
YCMD:delcar(playerid, params[], help)
{
        if(P_Data[playerid][pAdmin] < 2) return SCM(playerid, COLOR_RED, "You aren't admin!");
        new
            vehicleid,string[128];
        if(sscanf(params, "i", vehicleid)) return SCM(playerid, COLOR_RED, "Usage: /delcar [vehicleid[");
        if(vehicleid == INVALID_VEHICLE_ID) return SCM(playerid, COLOR_RED, "Wrong vehicleid");
        format(string, sizeof(string), "You deleted vehicle id: %i", vehicleid);
        SCM(playerid, -1,string);
        DestroyVehicle(vehicleid);
        return 1;
}
Dude, it's INVALID not INVAILD


Re: Invaild Vehicle ID sscanf - mrsamp - 30.07.2012

Whatever I fixed that. :P A smiple wrong spell by me. My bad, but reply if you see something wrong with the whole cmd. Thanks!


Re: Invaild Vehicle ID sscanf - SomebodyAndMe - 30.07.2012

I dont see anything wrong in it, does it works correctly?


Re: Invaild Vehicle ID sscanf - mrsamp - 30.07.2012

It worked perfect as I wanted but Thanks anyways!