SA-MP Forums Archive
What's wrong this this command and how to solve it? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: What's wrong this this command and how to solve it? (/showthread.php?tid=410476)



What's wrong this this command and how to solve it? - RiChArD_A - 25.01.2013

What's wrong this this command and how to solve it?
pawn Код:
dcmd_setscore(playerid,params[]){
    if (PlayerInfo[playerid][level] <3 && IsPlayerAdmin(playerid) == 0) return SendClientMessage(playerid,COLOR_RED,"You need to be a full administrator to use this command!");
    new id,val,string[128];
    if (sscanf(params,"ii",id,val)) return SendClientMessage(playerid,COLOR_GREEN,"Usage: /setscore [playerid] [value]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Player is not connected");
    if(playerid == id) return SendClientMessage(playerid,COLOR_RED,"Don't abuse");
    SetPlayerScore(id,val);
    new pName[MAX_PLAYER_NAME];
    new vName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,32);
    GetPlayerName(id,vName,32);
    format(string,sizeof string,"{FF0A00}-[Administrator: %s]- {FFFFFF}changed %s's score to %i.",pName,vName,val);
    SendClientMessageToAll(COLOR_GRAY,string);
    return 1;
}
Errors
Код:
\gamemodes\DM.pwn(1004) : error 017: undefined symbol "dcmd_setscore"
\gamemodes\DM.pwn(1005) : error 029: invalid expression, assumed zero
\gamemodes\DM.pwn(1005) : warning 215: expression has no effect
\gamemodes\DM.pwn(1005) : error 001: expected token: ";", but found "]"
\gamemodes\DM.pwn(1005) : error 029: invalid expression, assumed zero
\gamemodes\DM.pwn(1005) : fatal error 107: too many error messages on one line

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

5 Errors.
Thank you for your awesome help!


Re: What's wrong this this command and how to solve it? - Goldino - 25.01.2013

What errors do you get?


Re: What's wrong this this command and how to solve it? - DrDoom151 - 25.01.2013

Does it give you any errors/warnings or does it simply not work?


Respuesta: Re: What's wrong this this command and how to solve it? - RiChArD_A - 25.01.2013

Quote:
Originally Posted by Goldino
Посмотреть сообщение
What errors do you get?
Hoooooo yes yes I forgot to post them I'm sorry here yo go:
Код:
\gamemodes\DM.pwn(1004) : error 017: undefined symbol "dcmd_setscore"
\gamemodes\DM.pwn(1005) : error 029: invalid expression, assumed zero
\gamemodes\DM.pwn(1005) : warning 215: expression has no effect
\gamemodes\DM.pwn(1005) : error 001: expected token: ";", but found "]"
\gamemodes\DM.pwn(1005) : error 029: invalid expression, assumed zero
\gamemodes\DM.pwn(1005) : fatal error 107: too many error messages on one line

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

5 Errors.



Re: What's wrong this this command and how to solve it? - DaRk_RaiN - 25.01.2013

Fail.


Respuesta: Re: What's wrong this this command and how to solve it? - RiChArD_A - 25.01.2013

Quote:
Originally Posted by DaRk_RaiN
Посмотреть сообщение
Fail.
What? Are you going to help?


Respuesta: What's wrong this this command and how to solve it? - RiChArD_A - 25.01.2013

REVIVE


Re: What's wrong this this command and how to solve it? - DrDoom151 - 25.01.2013

Have you included dcmd properly?


AW: What's wrong this this command and how to solve it? - Blackazur - 25.01.2013

Have you included on top of your script the dcmd include?


Respuesta: Re: What's wrong this this command and how to solve it? - RiChArD_A - 25.01.2013

Quote:
Originally Posted by DrDoom151
Посмотреть сообщение
Have you included dcmd properly?
How I do it?