SA-MP Forums Archive
can you help me? - 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: can you help me? (/showthread.php?tid=603693)



can you help me? - pLamenT - 26.03.2016

I encountered an error , but the split did a robbery system

Код:
error 017: undefined symbol "zones"
error 036: empty statement
error 017: undefined symbol "s"
fatal error 107: too many error messages on one line

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


4 Errors.
The above error which rows

Код:
public update_zones()
{
 	new line1[10];
 	new line2[10];
	for(new i=0; i<MAX_PLAYERS_; i++)
	{
		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 s=0; s<sizeof(zones); s++){
 			    if(IsPlayerInZone(i,s) && player_zone[i] == -1){
				if(player_zone_before == -1){
                format(string,sizeof(string),"%s",zones[s][zone_name]);
                TextDrawSetString(LocationTD[i],string);
						}
	   	  				else
					 	{
					 		if(strcmp(zones[s][zone_name],zones[player_zone_before][zone_name],true) != 0)
					 		{
					 		    new string[128];
					 		    format(string,sizeof(string),"%s",zones[s][zone_name]);
						 		TextDrawSetString(LocationTD[i],string);
							}
						}
						player_zone[i] = s;
				      	format(line1,10,"p%dzone",i);
				      	format(line2,10,"%d",s);
				      	PropertySet(line1,line2);
					}
				}
				}
    			if(player_zone[i] == -1) player_zone[i] = player_zone_before;
			}
   		}
}
}
187.

Код:
for(new s=0; s<sizeof(zones); s++){



Re: can you help me? - YouServ - 26.03.2016

Variable "zones" doesn't exist. Make one.
Same to variable "s".


'zones' need to are an array if you use sizeof()