help pls
#1

I have a problem with code
code:
Код:
C:\Users\user\Desktop\org\scr\script\gamemodes\NBGv1.0.9.2.pwn(2337) : warning 216: nested comment
C:\Users\user\Desktop\org\scr\script\gamemodes\NBGv1.0.9.2.pwn(3444) : warning 217: loose indentation
C:\Users\user\Desktop\org\scr\script\gamemodes\NBGv1.0.9.2.pwn(3942) : warning 217: loose indentation
C:\Users\user\Desktop\org\scr\script\gamemodes\NBGv1.0.9.2.pwn(3992) : warning 217: loose indentation
C:\Users\user\Desktop\org\scr\script\gamemodes\NBGv1.0.9.2.pwn(9423) : warning 217: loose indentation
C:\Users\user\Desktop\org\scr\script\gamemodes\NBGv1.0.9.2.pwn(11373) : warning 216: nested comment
C:\Users\user\Desktop\org\scr\script\gamemodes\NBGv1.0.9.2.pwn(12068) : error 017: undefined symbol "foreach"
C:\Users\user\Desktop\org\scr\script\gamemodes\NBGv1.0.9.2.pwn(12068) : error 029: invalid expression, assumed zero
C:\Users\user\Desktop\org\scr\script\gamemodes\NBGv1.0.9.2.pwn(12068) : error 017: undefined symbol "i"
C:\Users\user\Desktop\org\scr\script\gamemodes\NBGv1.0.9.2.pwn(12068) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
thats worked before i don't know what happend now..
Reply
#2

Add this line at the top of your mode

pawn Код:
#include <YSI\y_iterate>
Reply
#3

Quote:
Originally Posted by S4t3K
Посмотреть сообщение
Add this line at the top of your mode

pawn Код:
#include <YSI\y_iterate>
still same error
Код:
C:\Users\user\Desktop\org\scr\script\gamemodes\NBGv1.0.9.2.pwn(2338) : warning 216: nested comment
C:\Users\user\Desktop\org\scr\script\gamemodes\NBGv1.0.9.2.pwn(3445) : warning 217: loose indentation
C:\Users\user\Desktop\org\scr\script\gamemodes\NBGv1.0.9.2.pwn(3943) : warning 217: loose indentation
C:\Users\user\Desktop\org\scr\script\gamemodes\NBGv1.0.9.2.pwn(3993) : warning 217: loose indentation
C:\Users\user\Desktop\org\scr\script\gamemodes\NBGv1.0.9.2.pwn(9424) : warning 217: loose indentation
C:\Users\user\Desktop\org\scr\script\gamemodes\NBGv1.0.9.2.pwn(11374) : warning 216: nested comment
C:\Users\user\Desktop\org\scr\script\gamemodes\NBGv1.0.9.2.pwn(12069) : error 017: undefined symbol "foreach"
C:\Users\user\Desktop\org\scr\script\gamemodes\NBGv1.0.9.2.pwn(12069) : error 029: invalid expression, assumed zero
C:\Users\user\Desktop\org\scr\script\gamemodes\NBGv1.0.9.2.pwn(12069) : error 017: undefined symbol "i"
C:\Users\user\Desktop\org\scr\script\gamemodes\NBGv1.0.9.2.pwn(12069) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#4

Maybe show the lines... It would be much easier to say whats wrong!
Reply
#5

Quote:
Originally Posted by Scrillex
Посмотреть сообщение
Maybe show the lines... It would be much easier to say whats wrong!
Код:
CMD:resethunt(playerid,params[]) {
	if(PlayerInfo[playerid][pAdmin] >= 3) {
		if(AdminDuty[playerid] != 1 && PlayerInfo[playerid][pAdmin] < 5)
	        return SendClientMessage(playerid,COLOR_WHITE, "You're not on-duty as admin. To access your admin commands you must be on-duty. Type /aduty to go on-duty.");
			
		HuntedTime = 0;
		foreach(new i : Player) {
			if(Hunted[i] != 0) {
				SetPlayerHealth(i, 0.0);
				Hunted[i] = 0;
			}
		}
		SendClientMessage(playerid,COLOR_WHITE, "The grim reaper has awaken.");
	}
	return true;
}
here you go
Reply
#6

pawn Код:
#include foreach
Test this include :/
Reply
#7

Quote:
Originally Posted by Clad
Посмотреть сообщение
pawn Код:
#include foreach
Test this include :/
i have it already, thats something in the code maybe?
and i have a codes with this foreach..
Reply
#8

pawn Код:
CMD:resethunt(playerid,params[]) {
       if(PlayerInfo[playerid][pAdmin] >= 3) {
       if(AdminDuty[playerid] != 1 && PlayerInfo[playerid][pAdmin] < 5)
       return SendClientMessage(playerid,COLOR_WHITE, "You're not on-duty as admin. To access your admin commands you must be on-duty. Type /aduty to go on-duty.");
           
       HuntedTime = 0;
       foreach(new i : Player) {
       if(Hunted[i] != 0) {
       SetPlayerHealth(i, 0.0);
       Hunted[i] = 0;
            }
        }
       SendClientMessage(playerid,COLOR_WHITE, "The grim reaper has awaken.");
    }
       return true;
}
Reply
#9

Quote:
Originally Posted by SHE790
Посмотреть сообщение
pawn Код:
CMD:resethunt(playerid,params[]) {
       if(PlayerInfo[playerid][pAdmin] >= 3) {
       if(AdminDuty[playerid] != 1 && PlayerInfo[playerid][pAdmin] < 5)
       return SendClientMessage(playerid,COLOR_WHITE, "You're not on-duty as admin. To access your admin commands you must be on-duty. Type /aduty to go on-duty.");
           
       HuntedTime = 0;
       foreach(new i : Player) {
       if(Hunted[i] != 0) {
       SetPlayerHealth(i, 0.0);
       Hunted[i] = 0;
            }
        }
       SendClientMessage(playerid,COLOR_WHITE, "The grim reaper has awaken.");
    }
       return true;
}
same error :P
Reply
#10

Well I aint familiar with foreach, but as u could nt get it to work yet maybe u can try out:


Код:
for(new i; i < MAX_PLAYERS; i++)
{
           if(Hunted[i] != 0)
           {
                 SetPlayerHealth(i, 0.0);
                 Hunted[i] = 0;
           }
}
You can replace MAX_PLAYERS with whatever array size u gave to the variable "Hunted"
Hope this helps
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)