Problem with Bizz system +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: Problem with Bizz system +Rep (
/showthread.php?tid=301072)
Problem with Bizz system +Rep -
N0FeaR - 03.12.2011
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;
Re: Problem with Bizz system +Rep -
N0FeaR - 03.12.2011
Anyone?
Re: Problem with Bizz system +Rep -
Tanush123 - 03.12.2011
remove the line
pawn Код:
new i = BizzEntered[playerid];
Re: Problem with Bizz system +Rep -
N0FeaR - 03.12.2011
Quote:
Originally Posted by Tanush123
remove the line
pawn Код:
new i = BizzEntered[playerid];
|
ok i will try
Re: Problem with Bizz system +Rep -
RelaxCafe - 03.12.2011
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;
Re: Problem with Bizz system +Rep -
English-Conceptz - 03.12.2011
the shadowing means you already declared that variables name somewhere else,
look for
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