SA-MP Forums Archive
global message errors - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: global message errors (/showthread.php?tid=109396)



global message errors - [LCG]TANKER - 19.11.2009

trying to make a clientmessage but im getting 2 type miss match errors cant figure it out, im sure it is something simple

should be

/g hi

== Tanker305:hi ==
pawn Код:
C:\Documents and Settings\Mark\Desktop\SA-MP .3a Server\gamemodes\desertwindbase.pwn(273) : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\Mark\Desktop\SA-MP .3a Server\gamemodes\desertwindbase.pwn(279) : error 035: argument type mismatch (argument 1)
pawn Код:
if(!strcmp(cmdtext, "/g", true, 3))
  {
  if(cmdtext[2] == 0)
    {
     SendClientMessage(playerid, COLOR_G, "USAGE: /(g)lobal <message>"); // error
     return 1;
    }
    new str[128];
        GetPlayerName(playerid, str, sizeof(str));
    format(str, sizeof(str), "== %s:%s ==", str, cmdtext[3]);
        SendClientMessageToAll(COLOR_G, str); // error
    return 1;
}
return 0;



Re: global message errors - Calix - 19.11.2009

what is COLOR_G defined as?


Re: global message errors - [LCG]TANKER - 19.11.2009

#define COLOR_G #BCEE68


Re: global message errors - Kyosaur - 19.11.2009

Код:
new Name[MAX_PLAYER_NAME], str[128];

GetPlayerName(playerid, Name, sizeof(Name));
format(str, sizeof(str), "== %s:%s ==", Name, cmdtext[3]);
Quote:
Originally Posted by [LCG
TANKER ]
#define COLOR_G #BCEE68
There's your problem


Re: global message errors - LarzI - 19.11.2009

Quote:
Originally Posted by [LCG
TANKER ]
#define COLOR_G #BCEE68
change to
pawn Код:
#define COLOR_G 0xBCEE68AA



Re: global message errors - [LCG]TANKER - 19.11.2009

figures dumb me used wrong color format

i cant seam to get it to work, /g works but im unable to send the msg i get a unknown command error


Re: global message errors - yom - 19.11.2009

Quote:
Originally Posted by lrZ^ aka LarzI
Quote:
Originally Posted by [LCG
TANKER ]
#define COLOR_G #BCEE68
change to
pawn Код:
#define COLOR_G 0xBCEE68AA
I still don't understand, why you use AA as alpha? Too many people may think it's the max value of a color channel but it isn't. The max value is FF (255). AA is 170, and this mean nothing. I agree that this have no effect in chat messages, but you have to learn it once and for all, AA is not the max value of a channel .

I also agree that this might be useless to post this, so please forgive me, i'm just trying to teach how to use things properly.


Re: global message errors - LarzI - 20.11.2009

I do know that FF is higher than AA (CC is min value, isn'tit?) but I've always used AA now it's a just a so called "routine" to use it


Re: global message errors - [LCG]TANKER - 20.11.2009

still no luck on fixing it