Jump to content

Recommended Posts

Posted

codu:

CMD:givepp(playerid,params[])
{
    if(PlayerInfo[playerid][pAdmin] == 0) return SCM(playerid, COLOR_ERROR, "Eroare: Nu ai acces");
    else SCM(playerid, COLOR_LIGHTGREEN, "(SERVER) Detii nivelul necesar pentru aceasta comanda.");
    new id,pp;
    if(sscanf(params,"ui",id,pp)) return SendClientMessage(playerid,-1,"Use: /givepp <ID/Name> <PP>"):
    if(!IsPlayerConnected(OtherPlayer) && OtherPlayer == INVALID_PLAYER_ID) return SendClientMessage(playerid,-1,"Jucatorul nu este online!");
    PlayerData[id][PP] = pp;
    return 1;
}

CMD:giveallpp(playerid,params[])
{
    if(PlayerInfo[playerid][pAdmin] == 0) return SCM(playerid, COLOR_ERROR, "Eroare: Nu ai acces");
    else SCM(playerid, COLOR_LIGHTGREEN, "(SERVER) Detii nivelul necesar pentru aceasta comanda.");
    new pp;
    if(sscanf(params,"i",pp)) return SendClientMessage(playerid,-1,"Use: /giveallpp <PP>"):

 

eroarea:

C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(599) : error 001: expected token: ";", but found ":"
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(599) : error 029: invalid expression, assumed zero
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(599 -- 600) : warning 215: expression has no effect
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(600) : error 001: expected token: ";", but found "if"
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(600) : fatal error 107: too many error messages on one line

Compilation aborted.

Pawn compiler 3.10.8              Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
[Finished in 0.6s]

Posted (edited)
CMD:giveallpp(playerid,params[])
{
    if(PlayerInfo[playerid][pAdmin] == 0) return SCM(playerid, COLOR_ERROR, "Eroare: Nu ai acces");
    else SCM(playerid, COLOR_LIGHTGREEN, "(SERVER) Detii nivelul necesar pentru aceasta comanda.");
    new pp;
    if(sscanf(params,"i",pp)) return SendClientMessage(playerid,-1,"Use: /giveallpp <PP>");

    new string[128];
    format( string, sizeof string, "Toata lumea a primit %d pp", pp );
    SendClientMessageToAll( -1, string );

    foreach( new i : Player )
    {
        PlayerData[id][PP] += pp;
    }
    return 1;
}    

 

Edited by AlexxAdv
Posted

C:\pawno\include\sscanf2.inc(155) : warning 219: local variable "i" shadows a variable at a preceding level
C:\pawno\include\sscanf2.inc(199) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(154) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(284) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(581) : warning 219: local variable "id" shadows a variable at a preceding level
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(598) : warning 219: local variable "id" shadows a variable at a preceding level
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(599) : error 001: expected token: ";", but found ":"
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(599) : error 029: invalid expression, assumed zero
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(599 -- 600) : warning 215: expression has no effect
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(600) : error 001: expected token: ";", but found "if"
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(600) : fatal error 107: too many error messages on one line
 

 

Posted

CMD:giveallpp(playerid,params[])
{
    if(PlayerInfo[playerid][pAdmin] == 0) return SCM(playerid, COLOR_ERROR, "Eroare: Nu ai acces");
    else SCM(playerid, COLOR_LIGHTGREEN, "(SERVER) Detii nivelul necesar pentru aceasta comanda.");
    new pp;
    if(sscanf(params,"i",pp)) return SendClientMessage(playerid,-1,"Use: /giveallpp <PP>");

    new string[128];
    format( string, sizeof string, "Toata lumea a primit %d pp", pp );
    SendClientMessageToAll( -1, string );

    foreach( new i : Player )
    {
        PlayerData[i][PP] += pp;
    }
    return 1;

Posted

C:\pawno\include\sscanf2.inc(155) : warning 219: local variable "i" shadows a variable at a preceding level
C:\pawno\include\sscanf2.inc(199) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(154) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(284) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(605) : error 017: undefined symbol "foreach"
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(605) : error 029: invalid expression, assumed zero
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(605) : error 017: undefined symbol "i"
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(605) : fatal error 107: too many error messages on one line
 

Posted

C:\pawno\include\sscanf2.inc(155) : warning 219: local variable "i" shadows a variable at a preceding level
C:\pawno\include\sscanf2.inc(199) : warning 219: local variable "i" shadows a variable at a preceding level
C:\pawno\include\foreach.inc(644) : warning 219: local variable "i" shadows a variable at a preceding level
C:\pawno\include\foreach.inc(758) : warning 219: local variable "i" shadows a variable at a preceding level
C:\pawno\include\foreach.inc(1095) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(155) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(285) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(606) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(606) : error 001: expected token: ";", but found "-identifier-"
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(606) : error 006: must be assigned to an array
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(606) : warning 215: expression has no effect
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(606) : error 001: expected token: ";", but found "]"
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(606) : fatal error 107: too many error messages on one line

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.