SendClientMessege error?
#1

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"); 
Reply
#2

"SendClientMessege" The correct spelling is "SendClientMessage"
Reply
#3

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..
Reply
#4

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.
Reply
#5

fixed-
Reply
#6

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

Something like this..
Reply
#7

U Typed "SendClientMessege" Wrong

Fix it To "SendClientMessage"
Reply
#8

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)