Returns wrong
#1

pawn Code:
new Float:Thing[MAX_PLAYERS];

COMMAND:thing(playerid, params[])
{
    new thing, string[128];
    if(sscanf(params, "f", thing)) return SendClientMessage(playerid, -1, "/speed (speed)");
    {
        Thing[playerid] = thing;

        format(string, sizeof(string), "You changed the thing to %f", Thing[playerid]);
        SendClientMessage(playerid, -1, string);
    }
    return 1;
}
if i type "/thing 20.0"
then it sais "You changed the thing to 11010048000.000000"
but it should say "You changed the thing to 20.000000"
Reply
#2

Chnage
Code:
new thing, string[128];
//to 
new Float:thing, string[128];
Reply
#3

Thnax man it worked!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)