Errors
#1

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)
Reply
#2

Help?
Reply
#3

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)