09.12.2011, 16:40
Alright, so I decided to create a Cops And Robbers server and now i'm going to use SSCANF2 instead of the old sscanf, So I created my first command to help me with my scripting
But it gives me errors on the sscanf line and to check if the vehid is in range of the working ids, saying
How come?
PHP код:
CMD:vspawn(playerid,params[])
{
new
Float:x,Float:y,Float:z,Float:a,
vehid;
if(sscanf(params,"i",vehid)) return SendClientMessage(playerid,COLOR_WHITE,"** Format ** /vspawn [vehid]");
else if(vehid < 400 || vehid > 611) return SendClientMessage(playerid,COLOR_WHITE,"Vehicle ID's range from 400-611.");
else
{
GetPlayerFacingAngle(playerid,a);
GetPlayerPos(playerid,x,y,z);
vehid = CreateVehicle(vehid,x,y,z,a,-1,-1,5000);
PutPlayerInVehicle(playerid,vehid,0);
}
return 1;
}
Код:
C:\Documents and Settings\Customer\Desktop\Cops And Robbers\gamemodes\cnr.pwn(315) : error 035: argument type mismatch (argument 2) C:\Documents and Settings\Customer\Desktop\Cops And Robbers\gamemodes\cnr.pwn(316) : error 035: argument type mismatch (argument 2) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.