SA-MP Forums Archive
SendClientMessege error? - 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: SendClientMessege error? (/showthread.php?tid=612954)



SendClientMessege error? - b0b - 23.07.2016

Hello i het all time this error

i have #define SCM SendClientMessege
PHP код:
error 017undefined symbol "SendClientMessege" 
PHP код:
CMD:kick(playerid,params[])
{
    new 
idreason[80], string[128];
       if(
sscanf(params,"us[80]",id,reason)) return SCM(playeridKASUTUSCOLOR,"KASUTA: /kick [ID/osanimest] [pхhjus]");
    if(
id == INVALID_PLAYER_ID) return SCM(playeridV_HPUNANE,"Vale ID !");
       if(
PlayerInfo[playerid][pAdmin] < 1) return SCM(playeridV_UPUNANE"Sa ei ole admin");
    
format(stringsizeof(string),"%s kickiti %s poolt, pхhjus: %s.",GetName(id), GetName(playerid), reason);
    
SendClientMessageToAll(V_HPUNANE,string);
    
Kick(id);
    return 
1;

LINES:
PHP код:
       if(sscanf(params,"us[80]",id,reason)) return SCM(playeridKASUTUSCOLOR,"KASUTA: /kick [ID/osanimest] [pхhjus]");
    if(
id == INVALID_PLAYER_ID) return SCM(playeridV_HPUNANE,"Vale ID !");
if(
PlayerInfo[playerid][pAdmin] < 1) return SCM(playeridV_UPUNANE"Sa ei ole admin"); 



Re: SendClientMessege error? - Tass007 - 23.07.2016

"SendClientMessege" The correct spelling is "SendClientMessage"


Re: SendClientMessege error? - WhiteGhost - 23.07.2016

Quote:
Originally Posted by b0b
Посмотреть сообщение
Hello i het all time this error

i have #define SCM SendClientMessege
PHP код:
error 017undefined symbol "SendClientMessege" 
PHP код:
CMD:kick(playerid,params[])
{
    new 
idreason[80], string[128];
       if(
sscanf(params,"us[80]",id,reason)) return SCM(playeridKASUTUSCOLOR,"KASUTA: /kick [ID/osanimest] [pхhjus]");
    if(
id == INVALID_PLAYER_ID) return SCM(playeridV_HPUNANE,"Vale ID !");
       if(
PlayerInfo[playerid][pAdmin] < 1) return SCM(playeridV_UPUNANE"Sa ei ole admin");
    
format(stringsizeof(string),"%s kickiti %s poolt, pхhjus: %s.",GetName(id), GetName(playerid), reason);
    
SendClientMessageToAll(V_HPUNANE,string);
    
Kick(id);
    return 
1;

LINES:
PHP код:
       if(sscanf(params,"us[80]",id,reason)) return SCM(playeridKASUTUSCOLOR,"KASUTA: /kick [ID/osanimest] [pхhjus]");
    if(
id == INVALID_PLAYER_ID) return SCM(playeridV_HPUNANE,"Vale ID !");
if(
PlayerInfo[playerid][pAdmin] < 1) return SCM(playeridV_UPUNANE"Sa ei ole admin"); 
Even if u define SendClientMessage as scm its still SendClientMessage

PHP код:
SendClientMessage(playeridV_UPUNANE"Sa ei ole admin"); 
Unless u make a stock..


Re: SendClientMessege error? - Crayder - 23.07.2016

You have this (or similar) somewhere: #define SCM SendClientMessege
In which you misspelled "Message", with an 'e' instead of an 'a'.
Change it to: #define SCM SendClientMessage

However, I personally hate when people shorten function names like that. It's just pure laziness and ugly, no matter what your native language is.


Re: SendClientMessege error? - b0b - 23.07.2016

fixed-


Re: SendClientMessege error? - WhiteGhost - 23.07.2016

PHP код:
stock SCM(playeridcolor, const message[])
{
        return 
SendClientMessage(playeridcolor,const message[]);

Something like this..


Re: SendClientMessege error? - RamzyR - 23.07.2016

U Typed "SendClientMessege" Wrong

Fix it To "SendClientMessage"


Re: SendClientMessege error? - Crayder - 23.07.2016

Quote:
Originally Posted by WhiteGhost
Посмотреть сообщение
PHP код:
stock SCM(playeridcolor, const message[])
{
        return 
SendClientMessage(playeridcolor,const message[]);

Something like this..
Absolutely not. The error would've been on those lines instead of in the command he showed us and it would just be dumb to do it like that.