[Ajuda] error 029: invalid expression, assumed zero
#1

ola pessoal sou noob em script, estou tentando adaptar esse comando para o meu servidor
e esta aparecendo esses erros aqui
Код:
C:\Users\marcos\Server Files2\gamemodes\zma.pwn(5200) : error 029: invalid expression, assumed zero
C:\Users\marcos\Server Files2\gamemodes\zma.pwn(5200) : error 012: invalid function call, not a valid address
C:\Users\marcos\Server Files2\gamemodes\zma.pwn(5200) : warning 215: expression has no effect
C:\Users\marcos\Server Files2\gamemodes\zma.pwn(5200) : error 029: invalid expression, assumed zero
C:\Users\marcos\Server Files2\gamemodes\zma.pwn(5200) : fatal error 107: too many error messages on one line

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


4 Errors.
o comando e esses

Код:
CMD:aduty(playerid,params[]) // Onduty
{
if(pInfo[playerid][pLogged] == 1)
  {
    if(pInfo[playerid][pAdminLevel] >= 3)
    {
        SendClientMessage(playerid,-1,"You are not authorised to use that command.");
        return 1;
    }
    if(IsOnAdminDuty[playerid] == false)
    {
        IsOnAdminDuty[playerid] = true;
        new pname[24],dstring[124];
        GetPlayerName(playerid,pname,sizeof(pname));
        format(dstring,sizeof(dstring), "{FF0000}Admin %s is now on duty.{FF0000}",pname);
        SendClientMessageToAll(-1,dstring);
        SetPlayerHealth(playerid,99999);
        SetPlayerArmour(playerid,80);
        SetPlayerSkin(playerid,117);
    }
    return 1;
}

CMD:dutyoff(playerid,params[]) <<----- aqui que da esse erro
{
if(pInfo[playerid][pLogged] == 1)
  {
     if(pInfo[playerid][pAdminLevel] >= 3)
    {
        SendClientMessage(playerid,-1,"You are not authorised to use that command.");
        return 1;
    }
    if(IsOnAdminDuty[playerid] == true)
    {
        IsOnAdminDuty[playerid] = false;
        new name[24],ostring[124];
        GetPlayerName(playerid,name,sizeof(name));
        format(ostring,sizeof(ostring), "{FF0000}Admin %s is now off duty.{FF0000}",name);
        SendClientMessageToAll(-1,ostring);
        SetPlayerHealth(playerid,100);
        SetPlayerArmour(playerid,0);
    }
    return 1;
}
se alguem poder me ajudar eu agradeзo +Rep
Reply
#2

No topo do GM

Код:
#include < zcmd >
Reply
#3

Quote:
Originally Posted by clerISoN
Посмотреть сообщение
No topo do GM

Код:
#include < zcmd >
ja tem esse include +valeu
Reply
#4

Faltou uma chave.
pawn Код:
CMD:aduty(playerid,params[]) // Onduty
{
    if(pInfo[playerid][pLogged] == 1)
    {
        if(pInfo[playerid][pAdminLevel] >= 3)
        {
            SendClientMessage(playerid,-1,"You are not authorised to use that command.");
            return 1;
        }
        if(IsOnAdminDuty[playerid] == false)
        {
            IsOnAdminDuty[playerid] = true;
            new pname[24],dstring[124];
            GetPlayerName(playerid,pname,sizeof(pname));
            format(dstring,sizeof(dstring), "{FF0000}Admin %s is now on duty.{FF0000}",pname);
            SendClientMessageToAll(-1,dstring);
            SetPlayerHealth(playerid,99999);
            SetPlayerArmour(playerid,80);
            SetPlayerSkin(playerid,117);
        }
    }
    return 1;
}
Reply
#5

Quote:
Originally Posted by Kuddy
Посмотреть сообщение
Faltou uma chave.
pawn Код:
CMD:aduty(playerid,params[]) // Onduty
{
    if(pInfo[playerid][pLogged] == 1)
    {
        if(pInfo[playerid][pAdminLevel] >= 3)
        {
            SendClientMessage(playerid,-1,"You are not authorised to use that command.");
            return 1;
        }
        if(IsOnAdminDuty[playerid] == false)
        {
            IsOnAdminDuty[playerid] = true;
            new pname[24],dstring[124];
            GetPlayerName(playerid,pname,sizeof(pname));
            format(dstring,sizeof(dstring), "{FF0000}Admin %s is now on duty.{FF0000}",pname);
            SendClientMessageToAll(-1,dstring);
            SetPlayerHealth(playerid,99999);
            SetPlayerArmour(playerid,80);
            SetPlayerSkin(playerid,117);
        }
    }
    return 1;
}
corrigido muito obrigado pela grande ajuda
funcionou
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)