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 219: local variable "pVW" shadows a variable at a preceding level
(3423) : warning 219: local variable "pInt" shadows a variable at a preceding level
(3424) : error 022: must be lvalue (non-constant)
(3425) : error 022: must be lvalue (non-constant)
(3423) : warning 203: symbol is never used: "pInt"
(3423) : warning 203: symbol is never used: "pVW"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
I created this:
PHP код:
//Grove Shop
if (IsPlayerInRangeOfPoint(playerid,8.0, 2514.3076, -1691.4675, 14.0460)) {
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pVW] = 0;
SetPlayerInterior(playerid, 6);
PlayerInfo[playerid][pInt] = 6;
Streamer_UpdateEx(playerid,296.9661,-111.9678,1001.5156 + 1100);
SetPlayerPos(playerid,296.9661,-111.9678,1001.5156 + 1100);
SetPlayerFacingAngle(playerid, 180);
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 pVW, pInt, Float:x, Float:y, Float:z, Float:a;
pVW = GetPlayerVirtualWorld(playerid);
pInt = GetPlayerInterior(playerid);
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
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(playerid, COLOR_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 ?