SA-MP Forums Archive
i cant define pInt and pVW - 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: i cant define pInt and pVW (/showthread.php?tid=573090)



i cant define pInt and pVW - IndependentGaming - 04.05.2015

Hello when i dont put pInt and pVW in the PlayerInfo list it saying pVW and pInt underfined symbol

when i put it in the list im getting this errors:

PHP код:
(3423) : warning 219local variable "pVW" shadows a variable at a preceding level
(3423) : warning 219local variable "pInt" shadows a variable at a preceding level
(3424) : error 022must be lvalue (non-constant)
(
3425) : error 022must be lvalue (non-constant)
(
3423) : warning 203symbol is never used"pInt"
(3423) : warning 203symbol is never used"pVW"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
2 Errors

I created this:

PHP код:
         //Grove Shop
        
if (IsPlayerInRangeOfPoint(playerid,8.02514.3076, -1691.467514.0460)) {
            
SetPlayerVirtualWorld(playerid0);
            
PlayerInfo[playerid][pVW] = 0;
            
SetPlayerInterior(playerid6);
            
PlayerInfo[playerid][pInt] = 6;
            
Streamer_UpdateEx(playerid,296.9661,-111.9678,1001.5156 1100);
            
SetPlayerPos(playerid,296.9661,-111.9678,1001.5156 1100);
            
SetPlayerFacingAngle(playerid180);
            
Streamer_Update(playerid);
        } 
But it gives me the error on another place:

PHP код:
    else if(dialogid == DIALOG_TEAMEDIT_SPAWN)
    {
        if(
response == 0)
        {
            
DeletePVar(playerid"TeamEdit");
            
DeletePVar(playerid"TeamID");
        }
        else
        {
            new 
team GetPVarInt(playerid"TeamID");
            new 
pVWpIntFloat:xFloat:yFloat:zFloat:a;
            
pVW GetPlayerVirtualWorld(playerid);
            
pInt GetPlayerInterior(playerid);
            
GetPlayerPos(playeridxyz);
            
GetPlayerFacingAngle(playerida);
            
TeamInfo[team][tsX] = x;
            
TeamInfo[team][tsY] = y;
            
TeamInfo[team][tsZ] = z;
            
TeamInfo[team][tsA] = a;
            
TeamInfo[team][tInt] = pInt;
            
TeamInfo[team][tVW] = pVW;
            
SendClientMessage(playeridCOLOR_WHITE"You successfully adjusted the spawn!");
            
g_mysql_save_team(team);
            
DeletePVar(playerid"TeamEdit");
            
DeletePVar(playerid"TeamID");
        }
    } 



Re: i cant define pInt and pVW - J4Rr3x - 04.05.2015

You have already made a global variables called pVW and pInt, review your script or rename the variables.


Re: i cant define pInt and pVW - IndependentGaming - 04.05.2015

You mean tVW and tInt?


Re: i cant define pInt and pVW - IndependentGaming - 04.05.2015

Anyone?


Re: i cant define pInt and pVW - Ahmad45123 - 04.05.2015

That problem happens when you have a 2 vars with same names.
Just change pInt to lets say.. ppInt ?