SendClientMessageFormatted # ****** version - 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: SendClientMessageFormatted # ****** version (
/showthread.php?tid=413194)
SendClientMessageFormatted # ****** version -
ADY26 - 04.02.2013
So i have ******'s scmformatted code
pawn Код:
stock SCMEx(playerid, color, fstring[], {Float, _}:...)
{
static const STATIC_ARGS = 3;
new n = (numargs() - STATIC_ARGS) * BYTES_PER_CELL;
if(n)
{
new message[144],arg_start,arg_end;
#emit CONST.alt fstring
#emit LCTRL 5
#emit ADD
#emit STOR.S.pri arg_start
#emit LOAD.S.alt n
#emit ADD
#emit STOR.S.pri arg_end
do
{
#emit LOAD.I
#emit PUSH.pri
arg_end -= BYTES_PER_CELL;
#emit LOAD.S.pri arg_end
}
while(arg_end > arg_start);
#emit PUSH.S fstring
#emit PUSH.C 144
#emit PUSH.ADR message
n += BYTES_PER_CELL * 3;
#emit PUSH.S n
#emit SYSREQ.C format
n += BYTES_PER_CELL;
#emit LCTRL 4
#emit LOAD.S.alt n
#emit ADD
#emit SCTRL 4
if(playerid == INVALID_PLAYER_ID)
{
#pragma unused playerid
return SendClientMessageToAll(color, message);
} else {
return SendClientMessage(playerid, color, message);
}
} else {
if(playerid == INVALID_PLAYER_ID)
{
#pragma unused playerid
return SendClientMessageToAll(color, fstring);
} else {
return SendClientMessage(playerid, color, fstring);
}
}
}
Working perfectly.. but the thing is .. i have a server where i have 2 languages and i don't want to have in every command if(pdata bla bla send this message else this message.. it will be simplier if i would do something like this
pawn Код:
stock SCMEx(playerid, color, e_str[],r_str[] {Float, _}:...)
Tried what i could and can do to make it work.. but i really can't get it to work.. so if someone could help me.. would appreciate it.
Also something else..
I get this message in server console :
sscanf error : unclosed specifier parameters
pawn Код:
sscanf(Query, "p<|>e<is[128]ifffs[64]ii>",FactionData[idx]);
Seems to be fine ?
Re: SendClientMessageFormatted # ****** version -
ADY26 - 04.02.2013
Quote:
Originally Posted by ******
Do you have the latest version of sscanf? And if you have multiple languages and want to send formatted messages, consider using y_languages.
|
Yep. Latest version.. it was working fine.. i don't really remember what i added or edited and it wasn't working anymore.
Re: SendClientMessageFormatted # ****** version -
ADY26 - 05.02.2013
Quote:
Originally Posted by ******
Are you sure it is that line that is the problem?
|
Well. yeah .
Screenshot - >
http://i.imgur.com/goW3cqc.jpg
That line and another one when loading playerdata.. but that one works fine.