17.05.2013, 21:42
I got this error while complieing my script
Here is what i added
pawn Код:
C:\Users\Daoud\Desktop\Grand theft Auto San Andreas + Samp\Pilots heaven\gamemodes\PH.pwn(20955) : error 017: undefined symbol "PlayerInfo"
C:\Users\Daoud\Desktop\Grand theft Auto San Andreas + Samp\Pilots heaven\gamemodes\PH.pwn(20955) : warning 215: expression has no effect
C:\Users\Daoud\Desktop\Grand theft Auto San Andreas + Samp\Pilots heaven\gamemodes\PH.pwn(20955) : error 001: expected token: ";", but found "]"
C:\Users\Daoud\Desktop\Grand theft Auto San Andreas + Samp\Pilots heaven\gamemodes\PH.pwn(20955) : error 029: invalid expression, assumed zero
C:\Users\Daoud\Desktop\Grand theft Auto San Andreas + Samp\Pilots heaven\gamemodes\PH.pwn(20955) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
pawn Код:
if(strcmp(cmd, "/jail", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /jail [playerid/PartOfName] [minutes] [reason]");
return 1;
}
new playa;
new time;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
time = strvalEx(tmp);
if(PlayerInfo[playerid][pAdmin] >= 2)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /jail [playerid/PartOfName] [minutes] [reason]");
return 1;
}
format(string, sizeof(string), "{AA3333}Admin Cmd{FFFF00}: %s has been jailed by an Admin, reason: %s", giveplayer, (result));
SendClientMessageToAll(COLOR_LIGHTRED, string);
ClearGuns(playa);
ResetPlayerWeapons(playa);
PlayerInfo[playa][pWantedLevel] = 0;
SetPlayerWantedLevel(playa, 0);
SetPlayerToTeamColor(playa);
PlayerInfo[playa][pJailed] = 1;
PlayerInfo[playa][pJailTime] = time*60;
SetPlayerInterior(playa, 6);
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[giveplayerid][pVirtualWorld] = 0;
SetPlayerPos(playa, 264.6288,77.5742,1001.0391);
SetPlayerFacingAngle(playa, -90);
format(string, sizeof(string), "You are jailed for %d minutes. Bail: Unable", time);
SendClientMessage(playa, COLOR_LIGHTBLUE, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not a Admin!");
}
}
return 1;
}