error 017: undefined symbol "i"
#1

how to fix? help

Код:
            case 1:
				{
					BementIdo[playerid] = 3;
					new hazak = sizeof(HouseInfo);
					if(IsAt(playerid,IsAt_HazElott) != NINCS)
					for(new i = 0; i < hazak; i++)
					if(PlayerToPoint(1, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
					if(HouseInfo[i][hDrog] != 1) return Msg(playerid,"A hбzban nincs droglabor!");
					SetPlayerVirtualWorld(playerid, i); <<ERROR!
					SetPlayerPos(playerid,1253.2783,-1701.6456,6319.3672);
					Freeze(playerid,5000);
					GameTextForPlayer(playerid, "~w~Ьdv itt!", 2000, 1);
					PlayerInfo[playerid][pLocal] = i; <<ERROR!
					Hazbanvan[playerid] = 1;
				}	
			}	
		}
	}
D:\Mбtй kйpei\RPG\26febrmof\icerpg.pwn(13346) : error 017: undefined symbol "i"
D:\Mбtй kйpei\RPG\26febrmof\icerpg.pwn(13350) : error 017: undefined symbol "i"
Reply
#2

Instead of writing:
Код:
[pLocal] = i;
Try this:
Код:
[pLocal] = i+6000;
__________________
+REP If I helped you

Reply
#3

Quote:
Originally Posted by micha654
Посмотреть сообщение
Instead of writing:
Код:
[pLocal] = i;
Try this:
Код:
[pLocal] = i+6000;
__________________
+REP If I helped you
How is that going to help him? It still won't define what the "i" is.

pawn Код:
case 1:
                {
                    for(new i = 0; i < hazak; i++)
                    {
                        if(PlayerToPoint(1, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
                        if(HouseInfo[i][hDrog] != 1) return Msg(playerid,"A hбzban nincs droglabor!");
                        SetPlayerVirtualWorld(playerid, i); <<ERROR!
                        SetPlayerPos(playerid,1253.2783,-1701.6456,6319.3672);
                        Freeze(playerid,5000);
                        GameTextForPlayer(playerid, "~w~Ьdv itt!", 2000, 1);
                        PlayerInfo[playerid][pLocal] = i; <<ERROR!
                        Hazbanvan[playerid] = 1;
                    }
                }  
            }  
        }
    }
Maybe adding callbacks fixes it. It'd be easier for me to understand if I knew what you were trying to do. Nevertheless; try this.
Reply
#4

Код:
for(new i = 0; i < hazak; i++)
Код:
error 017: undefined symbol "hazak"
Reply
#5

Quote:
Originally Posted by Slicebook
Посмотреть сообщение
Код:
for(new i = 0; i < hazak; i++)
Код:
error 017: undefined symbol "hazak"
What is "hazak" supposed to be?
Reply
#6

succeeded, thanks for the help
Reply
#7

By the way,

"I" means playerid.
Reply
#8

Quote:
Originally Posted by DerickClark
Посмотреть сообщение
By the way,

"I" means playerid.
Not always, "i" can be anything what you define it to be. In most cases however, it is defined as "playerid" in a loop.
Reply
#9

Quote:
Originally Posted by Mionee
Посмотреть сообщение
Not always, "i" can be anything what you define it to be. In most cases however, it is defined as "playerid" in a loop.
yea.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)