some errors. - 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: some errors. (
/showthread.php?tid=578755)
some errors. -
PowerF - 22.06.2015
Код:
F:\Project\pawno\include\mSelection.inc(598) : warning 219: local variable "str" shadows a variable at a preceding level
F:\Project\Gamemode\Innovative.pwn(12000) : error 035: argument type mismatch (argument 3)
F:\Project\Gamemode\Innovative.pwn(12242) : error 035: argument type mismatch (argument 3)
F:\Project\Gamemode\Innovative.pwn(12282) : error 017: undefined symbol "foreach"
F:\Project\Gamemode\Innovative.pwn(12282) : error 029: invalid expression, assumed zero
F:\Project\Gamemode\Innovative.pwn(12282) : error 017: undefined symbol "i"
F:\Project\Gamemode\Innovative.pwn(12282) : fatal error 107: too many error messages on one line
here
Код:
public OnPlayerDisconnect(playerid, reason)
{
new reasonMsg[25], leaveMsg[128], name[MAX_PLAYER_NAME];
switch(reason)
{
case 0: reasonMsg = "Timeout";
case 1: reasonMsg = "Leaving";
case 2: reasonMsg = "Kicked/Banned";
}
if(InRace[playerid] != -1) LeaveRace(playerid);
SendClientMessageToAllEx(-1,""WHITE"%s[%d] has left the server. (%s)", GetName(playerid), playerid, reasonMsg);
SetPlayerColor(playerid, 0xFFFFFFFF);
SendDeathMessage(INVALID_PLAYER_ID,playerid,201);
SetPlayerColor(playerid, PlayerInfo[playerid][Color]);
GetPlayerName(playerid, name, sizeof(name));
format(leaveMsg, sizeof(leaveMsg), "04***[LEAVE] 01%s[%d] has left the server. (%s)", name, playerid, reasonMsg);
IRC_GroupSay(groupID, IRC_CHANNEL, leaveMsg);
IRC_GroupSay(groupIDA, IRC_ADMIN_CHANNEL, leaveMsg);
DestroyVehicle(playerPV[playerid]);
DestroyDynamic3DTextLabel(playerPVLabel[playerid]);
if(PVeh[playerid] != INVALID_VEHICLE_ID)
{
DestroyVehicle(PVeh[playerid]);
PVeh[playerid] = INVALID_VEHICLE_ID;
}
KillTimer(nitroUseTimer[playerid]);
KillTimer(nitroReloadTimer[playerid]);
DestroyPlayerProgressBar(playerid, nitrobar[playerid]);
if(GetPVarInt(playerid, "Reconnecting") == 1)
{
new iStr[30], iP[16];
GetPVarString(playerid, "RecIP", iP, sizeof(iP));
format(iStr, sizeof(iStr), "unbanip %s", iP);
SendRconCommand(iStr);
SendRconCommand("reloadbans");
SetPVarInt(playerid, "Reconnecting", 0);
}
if(IsBeingSpeced[playerid] == 1)
foreach(Player,i)
if(spectatorid[i] == playerid)
TogglePlayerSpectating(i,false);
if(incbug[playerid] == 1)
incbug[playerid] = 0;
foreach(new i : Player)
if(LastSender[i] == playerid)
LastSender[i] = -1;
SaveStatus(playerid);
return 1;
}
i already included all includes the gamemode need.
Re: some errors. -
!damo!spiderman - 22.06.2015
Which line is 12000 and which line is 12242?
(12282) : error 017: undefined symbol "foreach" - foreach is part of YSI so you need to include that or one of the standalone foreach scripts to use it
Re: some errors. -
PowerF - 22.06.2015
in here it says including YSI pack
but i need amx file that ****** made on his YSI
i search it,and found it but inside amx folder is nothing.
Код:
foreach(new i : Player)
EDIT:Found it,but still errors
NOTE;I Already include the foreach
Re: some errors. -
PowerF - 22.06.2015
bump