Two times Y, for two different things.. [HELP]
#4

Oke look:

This is what I need for my OnPlayerKeyStateChange:

pawn Код:
new bool:jumper[MAX_PLAYERS];
new Float:x,Float:y,Float:z;
And this is the thing himself:

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_CROUCH && GetPlayerState(playerid) == PLAYER_STATE_SPECTATING && spectatorid[playerid] != INVALID_PLAYER_ID)
            {
                AdvanceSpectate(playerid);
            }
            else if(newkeys & KEY_JUMP && GetPlayerState(playerid) == PLAYER_STATE_SPECTATING && spectatorid[playerid] != INVALID_PLAYER_ID)
            {
                ReverseSpectate(playerid);
            }
    if(PRESSED(KEY_JUMP) && jumper[playerid] == true){
    GetPlayerVelocity(playerid, x, y, z);
    SetPlayerVelocity(playerid, x, y, z+ 0.3);}
    return 1;
}
And this is the other different thing, were I need the letter Y to.. :

pawn Код:
CMD:report(playerid, params[])
{
    new str[128], id, reason[128], msg[356], hs, ms, sec, y, m, d, ip[16];
    if(sscanf(params, "us[128]", id, reason)) return SendClientMessage(playerid, COLOR_ORANGE, "You must be type /report (id) (reason)");
    if(id == INVALID_PLAYER_ID) return ErrorMessages(playerid, 2);
    if(id == playerid) return ErrorMessages(playerid, 4);
    if(PlayerAcc[playerid][Admin] < PlayerAcc[id][Admin]) return ErrorMessages(playerid, 3);
    if(sscanf(params, "us[30]", id, reason)) return SendClientMessage(playerid, COLOR_ORANGE, "You must be type /report [playerid] [reason]");
    getdate(y, m, d);
    gettime(hs, ms, sec);
    GetPlayerIp(id, ip, sizeof(ip));
    ServerInfo[ReporterName] = GetName(playerid);
    ServerInfo[TargetName] = GetName(id);
    ServerInfo[Reason] = reason;
    ServerInfo[H] = hs;
    ServerInfo[M] = ms;
    ServerInfo[S] = sec;
    format(str, sizeof(str), "PLANETS ADMIN REPORTS: %s(ID:%d) has reported %s(ID:%d) (Reason: %s)", GetName(playerid), playerid, GetName(id), id, reason);
    SendMessageToAdmin(COLOR_BROWN, str);
    SendClientMessage(playerid, COLOR_LIME, "Your report has been sended to the Online Admins!");
    format(msg, sizeof(msg), "Player %s(ID:%d) has reported %s(ID:%d) (Reason: %s) [Reported Player IP: %s]", m, d, y, hs, ms, sec, GetName(playerid), playerid, GetName(id), id, reason, ip);
    SaveIn("reports", msg);
    return 1;
}
And this are the errors:

Quote:

F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(147 : warning 219: local variable "y" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(1737) : warning 204: symbol is assigned a value that is never used: "str"
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(174 : warning 204: symbol is assigned a value that is never used: "str"
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(2064) : warning 219: local variable "x" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(2064) : warning 219: local variable "y" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(2064) : warning 219: local variable "z" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(2094) : warning 219: local variable "x" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(2094) : warning 219: local variable "y" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(2094) : warning 219: local variable "z" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(2117) : warning 219: local variable "x" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(2117) : warning 219: local variable "y" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(2117) : warning 219: local variable "z" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(2245) : warning 219: local variable "x" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(2245) : warning 219: local variable "y" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(2245) : warning 219: local variable "z" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(2299) : warning 219: local variable "x" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(2299) : warning 219: local variable "y" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(2299) : warning 219: local variable "z" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(2557) : warning 219: local variable "x" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(2557) : warning 219: local variable "y" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(2557) : warning 219: local variable "z" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(2837) : warning 219: local variable "x" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(2837) : warning 219: local variable "y" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(2837) : warning 219: local variable "z" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(2899) : warning 219: local variable "x" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(2899) : warning 219: local variable "y" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(2899) : warning 219: local variable "z" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(2981) : warning 219: local variable "x" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(2981) : warning 219: local variable "y" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(2981) : warning 219: local variable "z" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(3063) : warning 219: local variable "x" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(3063) : warning 219: local variable "y" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(3063) : warning 219: local variable "z" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(3090) : warning 219: local variable "x" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(3090) : warning 219: local variable "y" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(3090) : warning 219: local variable "z" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(3709) : warning 219: local variable "x" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(3749) : warning 219: local variable "x" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(375 : warning 219: local variable "x" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(3783) : warning 219: local variable "x" shadows a variable at a preceding level
F:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(4125) : warning 219: local variable "y" shadows a variable at a preceding level

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 7 Guest(s)