SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 24/06/2011, 05:18 AM   #1
Unknown123
Guest
 
Posts: n/a
Default Returns wrong

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"
 
Old 24/06/2011, 05:48 AM   #2
Laronic
Huge Clucker
 
Laronic's Avatar
 
Join Date: Mar 2011
Posts: 412
Reputation: 57
Default Re: Returns wrong

Chnage
Code:
new thing, string[128];
//to 
new Float:thing, string[128];
Laronic is offline  
Old 24/06/2011, 05:51 AM   #3
Unknown123
Guest
 
Posts: n/a
Default Re: Returns wrong

Thnax man it worked!
 
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading integer from file with Dini returns wrong or null value admantis Help Archive 4 10/06/2011 03:42 AM
Getting a value with dini returns 0 Jochemd Help Archive 2 28/12/2010 09:09 AM
this always returns 1? :S cdcyborg Help Archive 1 25/11/2009 12:23 PM


All times are GMT. The time now is 11:56 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.