SA-MP Forums Archive
Scripting help +rep - 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: Scripting help +rep (/showthread.php?tid=538580)



Scripting help +rep - MrCallum - 22.09.2014

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;
}



Re: Scripting help +rep - ranme15 - 22.09.2014

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


Re: Scripting help +rep - MrCallum - 22.09.2014

How do I fix it?


Re: Scripting help +rep - ranme15 - 22.09.2014

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++) 



Re: Scripting help +rep - MrCallum - 22.09.2014

Yes but I still have errors but turns to that code!


Re: Scripting help +rep - MrCallum - 22.09.2014

Код:
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++)




Re: Scripting help +rep - killing - 22.09.2014

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

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



Re: Scripting help +rep - M0HAMMAD - 22.09.2014

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


Re: Scripting help +rep - MrCallum - 22.09.2014

I have omg!


Re: Scripting help +rep - Eth - 22.09.2014

show me ur new code.