PDA

View Full Version : somes errors


Karter
15/04/2014, 09:25 AM
hello i need your help for somes errors i have :


errors :

(391) : error 017: undefined symbol "Streamer_OnPlayerPickUpPickup"
(411) : error 017: undefined symbol "Streamer_OnPlayerEnterCP"
(431) : error 017: undefined symbol "Streamer_OnPlayerLeaveCP"
(451) : error 017: undefined symbol "Streamer_OnPlayerEnterRaceCP"
(471) : error 017: undefined symbol "Streamer_OnPlayerLeaveRaceCP"
(5386) : error 017: undefined symbol "foreach"
(5386) : error 029: invalid expression, assumed zero
(5386) : error 017: undefined symbol "Player"
(5386) : fatal error 107: too many error messages on one line

code :

{
new line1[10];
new line2[10];

foreach(new i:Player) // <-- the line 5386
{
if(IsPlayerConnected(i) && zoneupdates[i] == 1)
{
if(IsPlayerInZone(i,player_zone[i]))
{
}
else {
new player_zone_before;
player_zone_before = player_zone[i];
player_zone[i] = -1;
for(new j=0; j<sizeof(zones);j++)
{
if(IsPlayerInZone(i,j) && player_zone[i] == -1)
{

if(player_zone_before == -1)
{
new string[128];
format(string,sizeof(string),"%s",zones[j][zone_name]);
TextDrawSetString(LocationTD[i],string);
}
else
{
if(strcmp(zones[j][zone_name],zones[player_zone_before][zone_name],true) != 0)
{
new string[128];
format(string,sizeof(string),"%s",zones[j][zone_name]);
TextDrawSetString(LocationTD[i],string);
}
}
player_zone[i] = j;
format(line1,10,"p%dzone",i);
format(line2,10,"%d",j);
PropertySet(line1,line2);
}
}
if(player_zone[i] == -1) player_zone[i] = player_zone_before;
}
}


i can give you some code if you want, sorry for my very bad english!

thanks you!

IceBilizard
15/04/2014, 09:28 AM
First of all type this at top of your script


#include <foreach>


and foreach loop is like this


foreach(Player, i)
{
//here code
}