MySQL Floats
#4

---


EDIT: Fixed it by changing all the floats inside the enum having the Float: prefix.

pawn Код:
enum dEnum
{
    ID,
    Label[128],
    Label2[128],
    Float:X,
    Float:Y,
    Float:Z,
    I,
    VW,
    Float:X2,
    Float:Y2,
    Float:Z2,
    I2,
    VW2,
};
EDIT2: I read your reply once again, seeing that you mentioned the decimals not comming in, yea, it's correct. How do I do this with 6 floats?

EDIT3: This makes the X output to 0.000000:

pawn Код:
mysql_fetch_float(Doors[l][X]);
mysql_free_result();
EDIT4: Fixed by using floatstr instead of strval.

pawn Код:
Doors[l][ID] = strval(field[0]);
format(Doors[l][Label], 128, "%s", field[1]);
format(Doors[l][Label2], 128, "%s", field[2]);
Doors[l][X] = floatstr(field[3]);
Doors[l][Y] = floatstr(field[4]);
Doors[l][Z] = floatstr(field[5]);
Doors[l][I] = strval(field[6]);
Doors[l][VW] = strval(field[7]);
Doors[l][X2] = floatstr(field[8]);
Doors[l][Y2] = floatstr(field[9]);
Doors[l][Z2] = floatstr(field[10]);
Doors[l][I2] = strval(field[11]);
Doors[l][VW2] = strval(field[12]);
Reply


Messages In This Thread
MySQL Floats - by SKAzini - 28.02.2013, 13:37
Re: MySQL Floats - by Brokenbreaken - 28.02.2013, 13:41
Re: MySQL Floats - by Height - 28.02.2013, 13:50
Re: MySQL Floats - by SKAzini - 28.02.2013, 14:40

Forum Jump:


Users browsing this thread: 2 Guest(s)