Problem with Bizz system +Rep
#1

here the warning

Код:
C:\Users\Robin\Desktop\windows\gamemodes\RM-RP.pwn(29904) : warning 219: local variable "i" shadows a variable at a preceding level
here is the bizz code

Код:
}
			if(BizzEntered[playerid] != 9999)
		    {
		        new i = BizzEntered[playerid];

				if (PlayerToPoint(3, playerid,BizzInfo[i][bExitX], BizzInfo[i][bExitY], BizzInfo[i][bExitZ]))
				{
				    SetPlayerInterior(playerid,0);
					SetPlayerVirtualWorld(playerid, 0);
					OnPlayerExitFood(playerid);
					SetPlayerPos(playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]);
					SetPlayerVirtualWorld(playerid, 0);
					BizzEntered[playerid] = 9999;
Reply
#2

Anyone?
Reply
#3

remove the line
pawn Код:
new i = BizzEntered[playerid];
Reply
#4

Quote:
Originally Posted by Tanush123
Посмотреть сообщение
remove the line
pawn Код:
new i = BizzEntered[playerid];
ok i will try
Reply
#5

Quote:
Originally Posted by Tanush123
Посмотреть сообщение
remove the line
pawn Код:
new i = BizzEntered[playerid];
You do not know what the code above is. So I suggest you change that "i" to "u".

Код:
if(BizzEntered[playerid] != 9999)
		    {
		        new u = BizzEntered[playerid];

				if (PlayerToPoint(3, playerid,BizzInfo[u][bExitX], BizzInfo[u][bExitY], BizzInfo[u][bExitZ]))
				{
				    SetPlayerInterior(playerid,0);
					SetPlayerVirtualWorld(playerid, 0);
					OnPlayerExitFood(playerid);
					SetPlayerPos(playerid,BizzInfo[u][bEntranceX], BizzInfo[u][bEntranceY], BizzInfo[u][bEntranceZ]);
					SetPlayerVirtualWorld(playerid, 0);
					BizzEntered[playerid] = 9999;
Reply
#6

the shadowing means you already declared that variables name somewhere else,

look for
PHP код:
new i
to fix it either make the variable global (by putting it at the top under includes), if you need it to be used for the same thing through your script

if not then make a new one not called "i" make sure you change "i" to what ever your new one is through out that public
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)