SA-MP Forums Archive
[MySQL R33] Loading businesses problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [MySQL R33] Loading businesses problem (/showthread.php?tid=614279)



[MySQL R33] Loading businesses problem - Tester1 - 06.08.2016

Fixed!


Re: [MySQL R33] Loading businesses problem - Shinja - 06.08.2016

Show us how the table created, and btw add a line bizid++ in for (new i)


Re: [MySQL R33] Loading businesses problem - Tester1 - 06.08.2016

Quote:
Originally Posted by Shinja
Посмотреть сообщение
Show us how the table created, and btw add a line bizid++ in for (new i)



Re: [MySQL R33] Loading businesses problem - Shinja - 06.08.2016

X, Y, Z, EX, EY and EZ should be floats


Re: [MySQL R33] Loading businesses problem - Tester1 - 06.08.2016

Quote:
Originally Posted by Shinja
Посмотреть сообщение
X, Y, Z, EX, EY and EZ should be floats
Yep! my bad... I fixed this, but nothing is loaded in game.


Re: [MySQL R33] Loading businesses problem - Konstantinos - 06.08.2016

DOUBLE and FLOAT are both floating-point types. The problem is that field IDs start from 0 instead of 1 so you most likely get errors (in mysql log) for wrong data types.


Re: [MySQL R33] Loading businesses problem - Tester1 - 06.08.2016

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
DOUBLE and FLOAT are both floating-point types. The problem is that field IDs start from 0 instead of 1 so you most likely get errors (in mysql log) for wrong data types.
So what should I do to fix?


Re: [MySQL R33] Loading businesses problem - Konstantinos - 06.08.2016

You need to subtract the field id by 1 so:

1 becomes 0
10 becomes 9
and so on.


Re: [MySQL R33] Loading businesses problem - Tester1 - 06.08.2016

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
You need to subtract the field id by 1 so:

1 becomes 0
10 becomes 9
and so on.
Thank you! I solved the problem