please help why me get many warning? i already define
#1

at top of gamemode already defined:
pawn Код:
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(penis, 1, cmdtext);
    dcmd(hpenis, 1, cmdtext);
    dcmd(givepcash, 1, cmdtext);
    dcmd(healme, 1, cmdtext);
    dcmd(admincmd, 1, cmdtext);
    dcmd(help, 1, cmdtext);
    dcmd(buysawnoff, 2, cmdtext);
        return 0;
}
dcmd_unban(playerid, params[])///rcon unbanip [IP]
{
    SendClientMessage(playerid, COLOR_RED, "Usage: /unban [playerid]");
    SendClientMessage(playerid, COLOR_PINK, "You Need To /rcon login [password] To use this Commands");
    SendClientMessage(playerid, COLOR_RED, "Then /rcon unbanip [IP-HERE]");
    return 1;
}
dcmd_givepcash(playerid, params[])
{
    if(PlayerInfo[playerid][pAdminLevel] >= 1)
    {
        new toplayer, cash;
        if(!sscanf(params,"ui",toplayer, cash))
        {
            if(IsPlayerConnected(toplayer))
            {
                if(cash <= 1000000)
                {
                    new string[64];
                    new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
                    GetPlayerName(playerid, name, sizeof(name));
                    GetPlayerName(toplayer, PlayerName, sizeof(PlayerName));
                    format(string, sizeof(string), "Admin %s has gave you $%d.",name, cash);
                    SendClientMessage(playerid, 0xFFFF00FF, string);
                    format(string, sizeof(string), "You have gave to %s $%d.", PlayerName, cash);
                    SendClientMessage(playerid, 0xFFFF00FF, string);
                    GivePlayerMoney(toplayer, cash);
                }
                else return SendClientMessage(playerid, 0xFF0000FF,"You can't give that much");
            }
            else return SendClientMessage(playerid, 0xFF0000FF,"This player is not online.");
        }
        else return SendClientMessage(playerid, 0x00FFFFFF,"Usage: /givepcash [PlayerID][Amount]");
    }
    else return SendClientMessage(playerid, 0xFF0000FF,"Only a Administrator TEAM 1 can use this commands.");
    return 1;
}
dcmd_healme(playerid, params[])
{
    if(PlayerInfo[playerid][pAdminLevel] >= 1)
    {
    SetPlayerHealth(playerid, 100);
    SetPlayerArmour(playerid, 100);
    }
    else return SendClientMessage(playerid, 0xFF0000FF, "{C9FFAB}You Are Not Admin TEAM 1");
    return 1;
}
dcmd_admincmd(playerid, params[])
{
    if(PlayerInfo[playerid][pAdminLevel] >= 1)
    {
    SendClientMessage(playerid, COLOR_RED, "{FFAF00}/ban {F81414}/kick {C9FFAB}/unban {C77D87}/healme {C9FFAB}/givepcash");
    }
    else return SendClientMessage(playerid, 0xFF0000FF, "{C9FFAB}You Are Not Admin TEAM 1");
    return 1;
}
//end
dcmd_help(playerid, params[])
{
    SendClientMessage(playerid,COLOR_PINK,"{FFAF00}usage commands: {F81414}/pm /kill /about {C9FFAB}/animlist1 /animlist2 /buysawnoff");
    SendClientMessage(playerid,COLOR_PINK,"{FFAF00}usage commands: {F81414}/penis =SHow your penis {C9FFAB}/hpenis = for hide penis");
    SendClientMessage(playerid,COLOR_PINK,"{FFAF00}usage commands: {F81414}/shark /hshark");
    SendClientMessage(playerid,COLOR_PINK,"{F3FF02}ADMINISTRATOR TEAM 1: {C77D87}/admincmd");
    return 1;
}
// END COMMAND 15/3/2011

When compiling:

Код:
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(840) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(846) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(852) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(858) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(884) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(921) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(931) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(941) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(949) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(957) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(2131) : warning 203: symbol is never used: "dcmd_beer"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(2131) : warning 203: symbol is never used: "dcmd_ciggy"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(2131) : warning 203: symbol is never used: "dcmd_kiss"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(2131) : warning 203: symbol is never used: "dcmd_pee"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(2131) : warning 203: symbol is never used: "dcmd_sit"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(2131) : warning 203: symbol is never used: "dcmd_wank"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


16 Warnings.
Reply
#2

for the undefined "params", add this inside of that command:
pawn Код:
#pragma unused params
and for the undefined "dcmd_beer",

under OnPlayerCommandText(..)
also add:
pawn Код:
dcmd(beer, 4, cmdtext);
Reply
#3

ok i do:
pawn Код:
#pragma unused params
Код:
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(732) : error 017: undefined symbol "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(848) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(854) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(860) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(866) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(892) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(929) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(939) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(949) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(957) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(965) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(971) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(977) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(983) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(989) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(994) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(999) : warning 203: symbol is never used: "params"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#4

when not use:
pawn Код:
//#pragma unused params
i get warning only.'
Quote:

C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(84 : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(854) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(860) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(866) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(892) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(929) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(939) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(949) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(957) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(965) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(971) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(977) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(983) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(989) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(994) : warning 203: symbol is never used: "params"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(999) : warning 203: symbol is never used: "params"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


16 Warnings.

Reply
#5

okay me use all in zcmd cmd: but 4 error:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]) {
COMMAND:penis(playerid, params[])
{
    SetPlayerAttachedObject(playerid, PENIS, 322, 1, -0.403834, 0.239940, 0.038157, 279.414489, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
    SendClientMessage(playerid,  COLOR_GRAD2, "{9900CC} You have taked your penis ! {FF0066}Switch, what you want to do with that! {339900}You can use /hpenis now.");
    return 1;
}
i dont know why all code is true. maybe *enis only problem :P

Quote:

C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(731) : error 029: invalid expression, assumed zero
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(731) : error 017: undefined symbol "cmd_penis"
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(731) : error 029: invalid expression, assumed zero
C:\Documents and Settings\User\Desktop\SA-MP 0.3C WINDOWS SERVER\gamemodes\[GM]DMv3.0.pwn(731) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Reply
#6

DONE!!! i forgot remove
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]) {
thanks for comment yea guys

Quote:

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

Reply
#7

Great. Next time use the "Edit" button. Posting 4 - 5 times can get you in trouble
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)