floatsqroot
#1

Hi , I have some problems. I created an calculator script so I came to the root cmd. I created it but i don't know what's wrong with the code whatever the number I enter it always gives me the results like 10821082 and that stuff.

So can somebody make my code working?

pawn Код:
YCMD:root(playerid,params[],help) {
            #pragma unused help
            new sq,Float:res,str[128];
            if(sscanf(params, "i", sq)) return SendClientMessage(playerid,-1,"USAGE: /root [number]");
            res = floatsqroot(sq);
            format(str,sizeof str,"RESULT: %i",res);
            SendClientMessage(playerid,-1,str); return true; }
Reply


Messages In This Thread
floatsqroot - by STMatt - 16.11.2011, 18:51
Re: floatsqroot - by oliverrud - 16.11.2011, 19:26
Re: floatsqroot - by STMatt - 16.11.2011, 20:26

Forum Jump:


Users browsing this thread: 2 Guest(s)