[Solved] How to return to float?
#4

But I have:
pawn Код:
stock sGetFloat(filename[], string[])
{
    new filestring[256];
    new fromline[128][2];
    new File:newfile;
  new Float:value;
    newfile = fopen(filename, io_read);
    if(!newfile)
    {
        print("file not found");
        return floatround(value);
    }
    while(fread(newfile, filestring))
    {
        if(!strcmp(string, filestring, true, strlen(string)) && (filestring[strlen(string)] == '='))
        {
            split(filestring, fromline, '=');
            value = floatstr(fromline[1]);
            printf("rofl %f", value);
            return floatround(value);
        }
    }
    fclose(newfile);
    return floatround(value);
}
It doesn't work, or I am doing something wrong? It prints right float value in here: "printf("rofl %f", value);", but returns to 1.000
Reply


Messages In This Thread
[Solved] How to return to float? - by arnutisz - 29.07.2009, 20:41
Re: [HELP] How to return to float? - by paytas - 29.07.2009, 20:49
Re: [HELP] How to return to float? - by afei - 29.07.2009, 20:52
Re: [HELP] How to return to float? - by arnutisz - 29.07.2009, 20:54
Re: [HELP] How to return to float? - by arnutisz - 30.07.2009, 05:56
Re: [HELP] How to return to float? - by -Sneaky- - 30.07.2009, 06:02
Re: [HELP] How to return to float? - by arnutisz - 30.07.2009, 17:18
Re: [HELP] How to return to float? - by Joe Staff - 30.07.2009, 17:41

Forum Jump:


Users browsing this thread: 1 Guest(s)