error 017: undefined symbol "i"
#1

Am Having Errors this is something i can never fix at all well here is the code anyways.

Код:
public SetPlayerUnjail()
{
	if(TutTime[i] >= 1)
	{
		TutTime[i] += 1;
		if(TutTime[i] == 3)
  		{
			TextDrawHideForPlayer(i, SpawnClickI);
			TextDrawHideForPlayer(i, SpawnClickII);
			StopAudioStreamForPlayer(i);
   			SendClientMessage(i, COLOR_WHITE, "Welcome to {6422DD}Project Gaming RP{FFFFFF} , If you have any questions Regarding The script , use /requesthelp or /n");
     		SendClientMessage(i, COLOR_WHITE, "For a list of commands type /help. For more information And Tips - Type /tips , Also Visit our Forums at [www.comingsoon.com]");
       		CanTalk[i] = 1;
	        TutTime[i] = 0;
	        PlayerInfo[i][pSafeSpawn] = 1;
			PlayerInfo[i][pTut] = 1;
			gOoc[i] = 0; gNewbie[i] = 0; gNews[i] = 0; gFam[i] = 0;
			TogglePlayerControllable(i, 1);
			PlayerInfo[i][pHealth] = 100;
			PlayerInfo[i][pArmor] = 0;
			SetPlayerSpawn(i);
			}
		}
	}
	return 1;
}


Errors
Код:
(12688) : error 017: undefined symbol "i"
(12690) : error 017: undefined symbol "i"
(12691) : error 017: undefined symbol "i"
(12693) : error 017: undefined symbol "i"
(12694) : error 017: undefined symbol "i"
(12695) : error 017: undefined symbol "i"
(12696) : error 017: undefined symbol "i"
(12697) : error 017: undefined symbol "i"
(12698) : error 017: undefined symbol "i"
(12699) : error 017: undefined symbol "i"
(12700) : error 017: undefined symbol "i"
(12701) : error 017: undefined symbol "i"
(12702) : error 017: undefined symbol "i"
(12702) : error 017: undefined symbol "i"
(12702) : error 017: undefined symbol "i"
Reply
#2

Isn't it obvious? You haven't defined "i"

pawn Код:
new i;
//or
forward SetPlayerUnjail(i);
public SetPlayerUnjail(i)
{
//code
}
Reply
#3

EDIT: None Working
Reply
#4

Put

pawn Код:
for(new i; i < MAX_PLAYERS; i++)
{
    // Your code goes here
}
around it.
Reply
#5

Thanks guys that fixed the issue can get back to my scripting now without any issues.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)