Job Script Error - 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: Job Script Error (
/showthread.php?tid=604593)
Job Script Error -
Bulgaria - 07.04.2016
PHP код:
C:\Users\Борисов\Desktop\BG RP Server\filterscripts\Courier.pwn(81) : error 017: undefined symbol "foreach"
C:\Users\Борисов\Desktop\BG RP Server\filterscripts\Courier.pwn(81) : error 029: invalid expression, assumed zero
C:\Users\Борисов\Desktop\BG RP Server\filterscripts\Courier.pwn(81) : error 017: undefined symbol "Player"
C:\Users\Борисов\Desktop\BG RP Server\filterscripts\Courier.pwn(81) : 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.
this is Line 81
PHP код:
foreach(new i: Player)
Re: Job Script Error -
AndySedeyn - 07.04.2016
Have you included the foreach include?:
PHP код:
#include <foreach>
You need to have the .inc file in the /pawno/include directory.
Re: Job Script Error -
Bulgaria - 07.04.2016
Yes..... :/
Re: Job Script Error -
AndySedeyn - 07.04.2016
Is it the latest version? If so, do you mind showing a bit more code around the error line?
Re: Job Script Error -
Bulgaria - 07.04.2016
PHP код:
public OnFilterScriptExit()
{
foreach(new i: Player)
{
DeliveryMan[i] = false;
InJob[i] = false;
DisablePlayerCheckpoint(i);
KillTimer(Unload_Timer[i]);
}
return 1;
}
Re: Job Script Error -
AndySedeyn - 07.04.2016
Try:
PHP код:
foreach(Player, i);
And I just read that if you are using YSI 3.1 that you have to include y_iterate. Unless you're using the standalone version.
And if that works then update your include because that's deprecated syntax.
Re: Job Script Error -
Bulgaria - 07.04.2016
didnt work...