pawn Код:
CMD:calculate(playerid, params[])
{
new Float:Value1, Method[20], Float:Value2, string[128];
if(sscanf(params, "ffs", Value1, Value2, Method))
{
SendClientMessage(playerid, GREY, "SYNTAX: /calc(ulate) [value] [value] [method]");
SendClientMessage(playerid, GREY, "Method: Add, Subtract, Multiply & Divide.");
}
else
{
if(strcmp(Method, "add", true) == 0)
{
new Float:Sum = Value1 + Value2;
format(string, sizeof(string), "%f + %f = %f.", Value1, Value2, Sum);
SendClientMessage(playerid, WHITE, string);
}
}
return 1;
}
pawn Код:
format(string, sizeof(string), "%0.2f + %0.2f = %0.2f.", Value1, Value2, Sum);
Didn't fix it.
It's a limitation in the system - it does it with floats a lot, there's a thread around here explainin it somewhere... (i know from workin with floats)