C:\Users\Vlada\Desktop\UGRPG.pwn(6336) : error 029: invalid expression, assumed zero C:\Users\Vlada\Desktop\UGRPG.pwn(6336) : error 035: argument type mismatch (argument 1) C:\Users\Vlada\Desktop\UGRPG.pwn(6336) : error 017: undefined symbol "string" C:\Users\Vlada\Desktop\UGRPG.pwn(6336) : fatal error 107: too many error messages on one line

public OnPlayerDisconnect(playerid, reason)
{
new textreason[64];
new plname[8];
new playersip[8];
GetPlayerName(playerid, plname, sizeof(plname));
GetPlayerIp(playerid, playersip, sizeof(playersip));
SafeResetPlayerWeapons(playerid);
if(PlayerInfo[playerid][pAdminDuty] == 1)
{
SafeResetPlayerWeapons(playerid);
}
if(Searching[playerid] == 1)
{
RemovePlayerMapIcon(playerid, 500 + playerid);
Searching[playerid] = 0;
}
if(Ronned[playerid] >= 1)
{
KillTimer(RonnTimer[playerid]);
}
if(PlayerCuffed[playerid])
{
KillTimer(cufftimer[playerid]);
}
if(playerid == beingvoted)
{
KillTimer(votetimer1);
KillTimer(votetimer2);
format(string2,sizeof(string), "[Glasanje]: %s se izlogovao, glasanje je zavrseno! [%s]",plname[playerid])(); <--- HERE IS THE ERROR
SendClientMessageToAll(TEAM_GROVE_COLOR,string2);
votetimer1 = SetTimer("ResetVotation",300000,false);
}
if(PlayerCuffed[playerid] > 0)
{
KillTimer(cufftimer[playerid]);
}
if(Tazer[playerid] == 1) { SafeGivePlayerWeapon(playerid, 24, PreTazerAmmo[playerid]); }
Delete3DTextLabel(DutyLabel[playerid]);
Delete3DTextLabel(AfkLabel[playerid]);
gActivePlayers[playerid]--;
numplayers--;
RemovePlayerMapIcon(playerid, 37 + playerid);
TextDrawDestroy(Textdraw64[playerid]);
TextDrawDestroy(Textdraw54[playerid]);
TextDrawDestroy(Textdraw53[playerid]);
TextDrawDestroy(Textdraw52[playerid]);
TextDrawDestroy(Textdraw51[playerid]);
TextDrawDestroy(Textdraw49[playerid]);
TextDrawDestroy(Textdraw42[playerid]);
TextDrawDestroy(Textdraw41[playerid]);
TextDrawDestroy(Textdraw40[playerid]);
TextDrawDestroy(Textdraw39[playerid]);
TextDrawDestroy(Textdraw1[playerid]);
KillTimer(TrainTimer[playerid]);
KillTimer(MoneyTimer[playerid]);
else if(reason == 2)
{
strmid(PlayerInfo[playerid][pWhyLeft], "Kickovan/Banovan", 0, strlen("Kickovan/Banovan"), 255);
}
SaveGuns(playerid);
OnPlayerUpdateEx(playerid);
if(OfficerCourseStep[playerid] != 255)
{
SafeGivePlayerMoney(playerid, -2500);
}
if(OnOfficerTest[playerid] != 0)
{
SafeGivePlayerMoney(playerid, -5000);
}
if(ServerRestarted == 0)
{
UpdatePlayerPosition(playerid)
}
else if(reason == 2)
|
This function does not work when used in OnPlayerDisconnect because the player is already disconnected. It will return an invalid IP (255.255.255.255). Save players' IPs under OnPlayerConnect if they need to be used under OnPlayerDisconnect. |
format(string2,sizeof(string), "[Glasanje]: %s se izlogovao, glasanje je zavrseno! [%s]",plname[playerid])();
format(string2,sizeof(string), "[Glasanje]: %s se izlogovao, glasanje je zavrseno! [%s]",plname[playerid])();
format(string2,sizeof(string2), "[Glasanje]: %s se izlogovao, glasanje je zavrseno! [%s]",plname[playerid]);

format(string2,sizeof(string2), "[Glasanje]: %s se izlogovao, glasanje je zavrseno! [%s]",plname[playerid]);
public OnPlayerDisconnect(playerid, reason)
{
new string[128]; // I Guess you forgot this :P
new textreason[64];
new plname[8];
new playersip[8];