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: Errors (
/showthread.php?tid=587800)
Errors -
kleantzhubi - 02.09.2015
Hello,I need help to fix this..
Код:
OnTimers.pwn(17) : error 029: invalid expression, assumed zero
OnTimers.pwn(17) : warning 215: expression has no effect
OnTimers.pwn(17) : error 001: expected token: ";", but found "new"
OnTimers.pwn(17) : error 001: expected token: "-string end-", but found "-identifier-"
OnTimers.pwn(17) : fatal error 107: too many error messages on one line
-From Line 0 to 17-
Код:
//============================================//
//================[ Timers ]==================//
//============================================//
#include <a_samp>
#include <a_zones>
#include <KickEx>
#include <Foreach>
#include <sscanf2>
#include <streamer>
#include <zcmd>
public IdleKick()
{
new Float:x,Float:y,Float:z;
foreach (Player, i)
{
(foreach(new playerid : Player), "PlayerLogged") == 1 && GetPVarInt(i, "Admin") < 1)
Re: Errors -
kleantzhubi - 02.09.2015
Help?
Re: Errors -
Sjn - 02.09.2015
You are using foreach in incorrect way.
First you are using foreach like
foreach(Player, i) then why are you using it like
(foreach(new playerid : Player)? I am pretty sure that is causing the error.
If you are trying to check that the player is logged in or not, check how's the variable is set under login dialog. For example: GetPVarInt(playerid, "PlayerLogged"). Then replace the line
foreach(new playerid : Player), "PlayerLogged") == 1 with that var.