Undefined symbol "i"
#1

Hello scripters!

I'm making a tutorial for my server ( Godfather based ) and I get this error's"

Код:
D:\Servers\Killer\gamemodes\gamemode.pwn(305) : error 017: undefined symbol "i"
D:\Servers\Killer\gamemodes\gamemode.pwn(307) : error 017: undefined symbol "i"
D:\Servers\Killer\gamemodes\gamemode.pwn(308) : error 017: undefined symbol "i"
D:\Servers\Killer\gamemodes\gamemode.pwn(310) : error 017: undefined symbol "i"
D:\Servers\Killer\gamemodes\gamemode.pwn(311) : error 017: undefined symbol "i"
D:\Servers\Killer\gamemodes\gamemode.pwn(312) : error 017: undefined symbol "i"
D:\Servers\Killer\gamemodes\gamemode.pwn(313) : error 017: undefined symbol "i"
D:\Servers\Killer\gamemodes\gamemode.pwn(315) : error 017: undefined symbol "i"
D:\Servers\Killer\gamemodes\gamemode.pwn(317) : error 017: undefined symbol "i"
D:\Servers\Killer\gamemodes\gamemode.pwn(319) : error 017: undefined symbol "i"
D:\Servers\Killer\gamemodes\gamemode.pwn(321) : error 017: undefined symbol "i"
D:\Servers\Killer\gamemodes\gamemode.pwn(322) : error 017: undefined symbol "i"
D:\Servers\Killer\gamemodes\gamemode.pwn(323) : error 017: undefined symbol "i"
D:\Servers\Killer\gamemodes\gamemode.pwn(324) : error 017: undefined symbol "i"
D:\Servers\Killer\gamemodes\gamemode.pwn(325) : error 017: undefined symbol "i"
D:\Servers\Killer\gamemodes\gamemode.pwn(326) : error 017: undefined symbol "i"
D:\Servers\Killer\gamemodes\gamemode.pwn(328) : error 017: undefined symbol "i"
D:\Servers\Killer\gamemodes\gamemode.pwn(330) : error 017: undefined symbol "i"
D:\Servers\Killer\gamemodes\gamemode.pwn(332) : error 017: undefined symbol "i"
D:\Servers\Killer\gamemodes\gamemode.pwn(334) : error 017: undefined symbol "i"
D:\Servers\Killer\gamemodes\gamemode.pwn(335) : error 017: undefined symbol "i"
D:\Servers\Killer\gamemodes\gamemode.pwn(336) : error 017: undefined symbol "i"
D:\Servers\Killer\gamemodes\gamemode.pwn(337) : error 017: undefined symbol "i"
D:\Servers\Killer\gamemodes\gamemode.pwn(338) : error 017: undefined symbol "i"
D:\Servers\Killer\gamemodes\gamemode.pwn(339) : error 017: undefined symbol "i"
D:\Servers\Killer\gamemodes\gamemode.pwn(341) : error 017: undefined symbol "i"

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


26 Errors.
Could anyone help me?
Reply
#2

We're not psychic, show us the lines that are causing the errors.
Reply
#3

Код:
			if(TutTime[i] >= 1)
			{
				TutTime[i] += 1;
				if(TutTime[i] == 3)
				{
Reply
#4

Can you post your whole callback? I can't understand anything from that you had post.
Do you have a loop before the "If's"? As Calgon said:
Quote:
Originally Posted by CalgonX
We're not psychic, show us the lines that are causing the errors.
Reply
#5

Show me the lines between where you declare 'i' and the lines you've just shown me.
Reply
#6

Код:
forward SetPlayerUnjail();
Код:
public SetPlayerUnjail()
{
			if(TutTime[i] >= 1)
			{
				TutTime[i] += 1;
				if(TutTime[i] == 3)
				{
					SendClientMessage(i, COLOR_YELLOW, "Text comes here");
				}
				else if(TutTime[i] == 10)
				{
					SendClientMessage(i, COLOR_YELLOW, "Text comes here");
				}
				else if(TutTime[i] == 15)
				{
					TutTime[i] = 0; PlayerInfo[i][pTut] = 1;
					gOoc[i] = 0; gNews[i] = 0; gFam[i] = 0;
					TogglePlayerControllable(i, 1);
					MedicBill[i] = 0;
					SetPlayerSpawn(i);
				}
			}
		}
	}
}
Reply
#7

Код:
new i = 0; i < MAX_PLAYERS; i++
You are missing something like that...
Reply
#8

You have removed the loop. I think this might work.

Код:
public SetPlayerUnjail()
{
	for(new i=0; i<sizeof(TutTime); i++)
	{
		if(TutTime[i] >= 1)
		{
			TutTime[i] += 1;
			if(TutTime[i] == 3)
			{
				SendClientMessage(i, COLOR_YELLOW, "Text comes here");
			}
			else if(TutTime[i] == 10)
			{
				SendClientMessage(i, COLOR_YELLOW, "Text comes here");
			}
			else if(TutTime[i] == 15)
			{
				TutTime[i] = 0; PlayerInfo[i][pTut] = 1;
				gOoc[i] = 0; gNews[i] = 0; gFam[i] = 0;
				TogglePlayerControllable(i, 1);
				MedicBill[i] = 0;
				SetPlayerSpawn(i);
			}
		}
	}
}
Reply
#9

Quote:
Originally Posted by † мąүқоҳ™
Код:
new i = 0; i < MAX_PLAYERS; i++
You are missing something like that...
Yes, I fixed it. Thanks all for the fast reply's!
Reply
#10

Quote:
Originally Posted by Centulo
Код:
forward SetPlayerUnjail();
Код:
public SetPlayerUnjail()
{
			if(TutTime[i] >= 1)
			{
				TutTime[i] += 1;
				if(TutTime[i] == 3)
				{
					SendClientMessage(i, COLOR_YELLOW, "Text comes here");
				}
				else if(TutTime[i] == 10)
				{
					SendClientMessage(i, COLOR_YELLOW, "Text comes here");
				}
				else if(TutTime[i] == 15)
				{
					TutTime[i] = 0; PlayerInfo[i][pTut] = 1;
					gOoc[i] = 0; gNews[i] = 0; gFam[i] = 0;
					TogglePlayerControllable(i, 1);
					MedicBill[i] = 0;
					SetPlayerSpawn(i);
				}
			}
		}
	}
}
You're not even declaring 'i' - this is your problem!

pawn Код:
public SetPlayerUnjail()
{
  for( new i = 0; i < MAX_PLAYERS; i++ )
  {
        if(TutTime[i] >= 1)
        {
            TutTime[i] += 1;
            if(TutTime[i] == 3)
            {
                SendClientMessage(i, COLOR_YELLOW, "Text comes here");
            }
            else if(TutTime[i] == 10)
            {
                SendClientMessage(i, COLOR_YELLOW, "Text comes here");
            }
            else if(TutTime[i] == 15)
            {
                TutTime[i] = 0; PlayerInfo[i][pTut] = 1;
                gOoc[i] = 0; gNews[i] = 0; gFam[i] = 0;
                TogglePlayerControllable(i, 1);
                MedicBill[i] = 0;
                SetPlayerSpawn(i);
            }
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)