10.09.2011, 13:22
So, i have this global value outside all functions to make it a global one
And some codes to get the carguy's position and set players positions to there when they spawn:
Which are fine. I also have a code to set the value of that global var so my server works propperly:
But pawno gives me these warnings:
Problem: I dont want the carguyid to be a local var when i do "new carguyid = playerid", i want it to set the value of the global var i created back there to the playerid value.
So... little help here?
Code:
new carguyid;
Code:
if (GetPlayerTeam(playerid) == 2)
{
new Float:x;
new Float:y;
new Float:z;
GetPlayerPos(carguyid,x,y,z);
SetPlayerPos(playerid,x,y,z + 100);
SendClientMessage(playerid,COLOR_WHITE,"You are now skidiving over the Carguy, do /Getcar when you want your vehicle!");
}
Code:
if (GetPlayerTeam(playerid) == 1)
{
new carguyid = playerid;
.....................
Code:
C:\Users\Henrique\Desktop\SAMP - The Project\Dir\gamemodes\Carguy.pwn(204) : warning 219: local variable "carguyid" shadows a variable at a preceding level C:\Users\Henrique\Desktop\SAMP - The Project\Dir\gamemodes\Carguy.pwn(204) : warning 204: symbol is assigned a value that is never used: "carguyid"
So... little help here?


