Command /aduty errors
#1

I was going to make a command and i got some errors and i can't solve it.. So, i need help from someone who really know how to solve this

Here's the error:
pawn Код:
C:\DOCUME~1\winxp\Desktop\Games\GGRPSC~1\GAMEMO~1\GGRP.pwn(78577) : error 010: invalid function or declaration
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
At command:
pawn Код:
CMD:aduty(playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][aDuty] == 0)
        {
            new string[128];
            format(string, sizeof(string), "%s sekarang sedang bertugas sebagai Admin, gunakan /report untuk melapor.", GetPlayerNameEx(playerid));
            SendClientMessageToAllEx(COLOR_LIGHTRED, string);
            }
            PlayerInfo[playerid][aDuty] = 1;
            SetPlayerColor(playerid, COLOR_RED);
            SendClientMessageEx(playerid, COLOR_WHITE, "Kamu sekarang sedang bertugas sebagai admin, untuk kembali ke mode RP ketik /aduty kembali.");
            }
            else
            {
                new string[128];
                PlayerInfo[playerid][aDuty] = 0;
                SetPlayerColor(playerid, COLOR_WHITE);
                format(string, sizeof(string), "%s sekarang tidak betugas kembali sebagai admin dan kembali untuk roleplay.", GetPlayerNameEx(playerid));
                SendClientMessageToAllEx(COLOR_LIGHTRED, string);
                }
            }
            return 1;
}
On Line 78577
pawn Код:
return 1;


Is something wrong on the script?


I already put this on my script

Quote:
pawn Код:
PlayerInfo[playerid][aDuty] = 0;

and

aDuty,
Reply
#2

you need to has
new GetPlayerNameEx [MAX_PLAYER_NAME];
i think this will help you


""SORRY FOR MY ENGLISH"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)