18.12.2014, 11:13
Hello Every One
i Have Errors see
full code
and /Vehicle Spawner
this code the error
i Have Errors see
Quote:
D:\ffff\gamemodes\fast.pwn(1326) : error 003: declaration of a local variable must appear in a compound block D:\ffff\gamemodes\fast.pwn(1326) : error 017: undefined symbol "string" D:\ffff\gamemodes\fast.pwn(1326) : warning 215: expression has no effect D:\ffff\gamemodes\fast.pwn(1326) : error 001: expected token: ";", but found "]" D:\ffff\gamemodes\fast.pwn(1326) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. |
PHP код:
CMD:sethp(playerid, params[])
{
if(PlayerInfo[playerid][pRank] == 2.6)
new string[128],targetid,Float:Heal,Pname[MAX_PLAYER_NAME],Iname[MAX_PLAYER_NAME];
GetPlayerName(playerid,Pname,sizeof(Pname));
GetPlayerName(targetid,Iname,sizeof(Iname));
if(sscanf(params, "ud", targetid,Heal))
{
SendClientMessage(playerid,-1,"USAGE: /SetHealth (Player Name/ID) (Health)");
return 1;
}
if(!IsPlayerConnected(targetid))
{
format(string,sizeof(string),"The Player ID (%d) is not connected to the server. You cannot heal them.",targetid);
SendClientMessage(playerid,-1,string);
return 1;
}
SetPlayerHealth(playerid,heal);
format(string,sizeof(string),"You Have Set %s(%d) Health To %d",Iname,targetid,Heal);
SendClientMessage(playerid,-1,string);
format(string,sizeof(string),"%s(%d) Has Set Your Health To %d",Pname,playerid,Heal);
SendClientMessage(targetid,-1,string);
SetPlayerHealth(targetid, health);
}
return 1;
}
Quote:
D:\ffff\gamemodes\fast.pwn(400) : error 017: undefined symbol "aVehicleNames" D:\ffff\gamemodes\fast.pwn(400) : warning 215: expression has no effect D:\ffff\gamemodes\fast.pwn(400) : error 001: expected token: ";", but found "]" D:\ffff\gamemodes\fast.pwn(400) : error 029: invalid expression, assumed zero D:\ffff\gamemodes\fast.pwn(400) : fatal error 107: too many error messages on one line |
PHP код:
stock GetVehicleModelID(vehiclename[])
{
for(new i = 0; i < 211; i++)
{
if(strfind(aVehicleNames[i], vehiclename, true) != -1)
return i + 400;
}
return -1;
}
Quote:
if(strfind(aVehicleNames[i], vehiclename, true) != -1) |