22.02.2014, 14:35
Hello. I've unusual problem, because I really don't know how to go about it. Now I explain what I mean - I want to get something like this, without #emit directive, because I don't know it:
Code above doesn't work and all what I need is to know (or to learn) how to use the {Float, _} or ... in format. If I'll use data - PAWN will not accept this and will show sort of errors like this:
If I'll use only
instead
or even
or
it will compile, but it will not work. I thought about getting function arguments and save them into variable, but I don't know how to do it.
pawn Код:
stock SendFormattedMessage(id, colour = -1, string[] = "", message[] = "", {Float, _}:...) {
new str = sizeof(string[]);
new data = {Float, _}:...;
format(string, str, message, data);
SendClientMessage(id, colour, message);
printf(message);
}
Код:
error 017: undefined symbol "Float" error 029: invalid expression, assumed zero error 029: invalid expression, assumed zero fatal error 107: too many error messages on one line
pawn Код:
new data;
pawn Код:
new data = {Float, _}:...;
pawn Код:
new data = Float, _;
pawn Код:
new data = _;