Scripting help +rep
#1

Quote:

C:\Users\Callum.Acer\Desktop\Scripting extra\gamemodes\Millenium.pwn(2245) : error 017: undefined symbol "i"
C:\Users\Callum.Acer\Desktop\Scripting extra\gamemodes\Millenium.pwn(2247) : error 017: undefined symbol "i"
C:\Users\Callum.Acer\Desktop\Scripting extra\gamemodes\Millenium.pwn(2247) : warning 215: expression has no effect
C:\Users\Callum.Acer\Desktop\Scripting extra\gamemodes\Millenium.pwn(2247) : error 001: expected token: ";", but found ")"
C:\Users\Callum.Acer\Desktop\Scripting extra\gamemodes\Millenium.pwn(2247) : error 029: invalid expression, assumed zero
C:\Users\Callum.Acer\Desktop\Scripting extra\gamemodes\Millenium.pwn(2247) : fatal error 107: too many error messages on one line

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


5 Errors.

Код:
SyncTurfWarsRadar(playerid)
{
	if(turfWarsRadar[playerid] == 0) { return 1; }
	HideTurfWarsRadar(playerid);
	turfWarsRadar[playerid] = 1;
	//for(new i = 0; i < MAX_TURFS; i++)
	{
	    if(TurfWars[i][twGangZoneId] != -1)LINE 2245
	    {
	        if(TurfWars[i][twOwnerId] >= 0 && TurfWars[i][twOwnerId] <= MAX_FAMILY-1) LINE 2247
	        {
	            switch(FamilyInfo[TurfWars[i][twOwnerId]][FamilyColor])
	            {
	                case 0: // Black
	                {
	            		GangZoneShowForPlayer(playerid,TurfWars[i][twGangZoneId],COLOR_TWBLACK);
					}
					case 1: // White
					{
					    GangZoneShowForPlayer(playerid,TurfWars[i][twGangZoneId],COLOR_TWWHITE);
					}
					case 2: // Red
					{
					    GangZoneShowForPlayer(playerid,TurfWars[i][twGangZoneId],COLOR_TWRED);
					}
					case 3: // Blue
					{
					    GangZoneShowForPlayer(playerid,TurfWars[i][twGangZoneId],COLOR_TWBLUE);
					}
					case 4: // Yellow
					{
					    GangZoneShowForPlayer(playerid,TurfWars[i][twGangZoneId],COLOR_TWYELLOW);
					}
					case 5: // Purple
					{
					    GangZoneShowForPlayer(playerid,TurfWars[i][twGangZoneId],COLOR_TWPURPLE);
					}
					case 6: // Pink
					{
					    GangZoneShowForPlayer(playerid,TurfWars[i][twGangZoneId],COLOR_TWPINK);
					}
					case 7: // Brown
					{
					    GangZoneShowForPlayer(playerid,TurfWars[i][twGangZoneId],COLOR_TWBROWN);
					}
					case 8: // Gray
					{
					    GangZoneShowForPlayer(playerid,TurfWars[i][twGangZoneId],COLOR_TWGRAY);
					}
					case 9: // Olive
					{
					    GangZoneShowForPlayer(playerid,TurfWars[i][twGangZoneId],COLOR_TWOLIVE);
					}
					case 10: // Tan
					{
					    GangZoneShowForPlayer(playerid,TurfWars[i][twGangZoneId],COLOR_TWTAN);
					}
					case 11: // Aqua
					{
					    GangZoneShowForPlayer(playerid,TurfWars[i][twGangZoneId],COLOR_TWAQUA);
					}
					case 12: // Orange
					{
					    GangZoneShowForPlayer(playerid,TurfWars[i][twGangZoneId],COLOR_TWORANGE);
					}
					case 13: // Azure
					{
					    GangZoneShowForPlayer(playerid,TurfWars[i][twGangZoneId],COLOR_TWAZURE);
					}
					case 14: // Green
					{
					    GangZoneShowForPlayer(playerid,TurfWars[i][twGangZoneId],COLOR_TWGREEN);
					}
				}
	        }
	        else
	        {
	            GangZoneShowForPlayer(playerid,TurfWars[i][twGangZoneId],COLOR_BLACK);
	        }

	        if(TurfWars[i][twFlash] == 1)
	        {
	            switch(TurfWars[i][twFlashColor])
	            {
	                case 0: // Black
	                {
	            		GangZoneFlashForPlayer(playerid, TurfWars[i][twGangZoneId],COLOR_TWBLACK);
					}
					case 1: // White
					{
					    GangZoneFlashForPlayer(playerid, TurfWars[i][twGangZoneId],COLOR_TWWHITE);
					}
					case 2: // Red
					{
         				GangZoneFlashForPlayer(playerid, TurfWars[i][twGangZoneId],COLOR_TWRED);
					}
					case 3: // Blue
					{
					    GangZoneFlashForPlayer(playerid, TurfWars[i][twGangZoneId],COLOR_TWBLUE);
					}
					case 4: // Yellow
					{
					    GangZoneFlashForPlayer(playerid, TurfWars[i][twGangZoneId],COLOR_TWYELLOW);
					}
					case 5: // Purple
					{
					    GangZoneFlashForPlayer(playerid, TurfWars[i][twGangZoneId],COLOR_TWPURPLE);
					}
					case 6: // Pink
					{
					    GangZoneFlashForPlayer(playerid, TurfWars[i][twGangZoneId],COLOR_TWPINK);
					}
					case 7: // Brown
					{
					    GangZoneFlashForPlayer(playerid, TurfWars[i][twGangZoneId],COLOR_TWBROWN);
					}
					case 8: // Gray
					{
					    GangZoneFlashForPlayer(playerid, TurfWars[i][twGangZoneId],COLOR_TWGRAY);
					}
					case 9: // Olive
					{
					    GangZoneFlashForPlayer(playerid, TurfWars[i][twGangZoneId],COLOR_TWOLIVE);
					}
					case 10: // Tan
					{
					    GangZoneFlashForPlayer(playerid, TurfWars[i][twGangZoneId],COLOR_TWTAN);
					}
					case 11: // Aqua
					{
					    GangZoneFlashForPlayer(playerid, TurfWars[i][twGangZoneId],COLOR_TWAQUA);
					}
					case 12: // Orange
					{
					    GangZoneFlashForPlayer(playerid, TurfWars[i][twGangZoneId],COLOR_TWORANGE);
					}
					case 13: // Azure
					{
					    GangZoneFlashForPlayer(playerid, TurfWars[i][twGangZoneId],COLOR_TWAZURE);
					}
					case 14: // Green
					{
					    GangZoneFlashForPlayer(playerid, TurfWars[i][twGangZoneId],COLOR_TWGREEN);
					}
				}
	        }
	        else
	        {
	            GangZoneStopFlashForPlayer(playerid, TurfWars[i][twGangZoneId]);
	        }
	    }
	}
	return 1;
}
Reply
#2

You've commented the loop (which stores the 'i' variable).
Reply
#3

How do I fix it?
Reply
#4

Quote:
Originally Posted by MrCallum
Посмотреть сообщение
How do I fix it?
Change:
PHP код:
//for(new i = 0; i < MAX_TURFS; i++) 
To:
PHP код:
for(new 0MAX_TURFSi++) 
Reply
#5

Yes but I still have errors but turns to that code!
Reply
#6

Код:
C:\Users\Callum.Acer\Desktop\Scripting extra\gamemodes\Millenium.pwn(2244) : error 029: invalid expression, assumed zero
C:\Users\Callum.Acer\Desktop\Scripting extra\gamemodes\Millenium.pwn(2244) : warning 215: expression has no effect
C:\Users\Callum.Acer\Desktop\Scripting extra\gamemodes\Millenium.pwn(2244) : error 001: expected token: ")", but found ";"
C:\Users\Callum.Acer\Desktop\Scripting extra\gamemodes\Millenium.pwn(2244) : error 036: empty statement
C:\Users\Callum.Acer\Desktop\Scripting extra\gamemodes\Millenium.pwn(2244) : fatal error 107: too many error messages on one line

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


4 Errors.
Quote:

for(new i = 0; i < MAX_TURFS; i++)

Reply
#7

Код:
//for(new i = 0; i < MAX_TURFS; i++)
Change this to

Код:
for(new i = 0; i < MAX_TURFS; i++);
Reply
#8

This :
//for(new i = 0; i < MAX_TURFS; i++)
Delete "//"
Reply
#9

I have omg!
Reply
#10

show me ur new code.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)