27.06.2012, 15:45
Where is an error in this code? Because i got wrong result.
Result photo:
Thanks, for help.
Код:
stock Veiksmas(playerid, Float:Skaicius, type) { new Float:RezultatasBendras; if(type == 1) RezultatasBendras= floatsub(pInfo[playerid][Bendras], Skaicius); else RezultatasBendras= floatadd(pInfo[playerid][Bendras], Skaicius); new msg[126]; format(msg, 126, "1. - %.2f, 2. - %.2f, Result: - %.2f", pInfo[playerid][Bendras], Skaicius, RezultatasBendras); SendClientMessage(playerid, -1, msg); pInfo[playerid][Bendras] = RezultatasBendras; new etcString[18]; format(etcString, 18, "%.2f", RezultatasBendras); SendClientMessage(playerid, -1, etcString); }
Thanks, for help.