SA-MP Forums Archive
MySQL - Not Loading - 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 - Not Loading (/showthread.php?tid=384468)



MySQL - Not Loading - Ashley - 12.10.2012

Hello,

I'm having a bit of a problem with the loading of MySQL based player stats.

I'm using the code below, but it's not loading anything from the database, yet if I manually edit the database again to set the correct stats, when it logs the account on, it'll wipe the stats, and remove the password etc.

The code is here:
http://pastebin.com/m1NiL6J4

Could someone please explain what I'm doing wrong, and help me correct it please - I've been toying for hours now.


Re: MySQL - Not Loading - newbienoob - 12.10.2012

I'm not sure if this will fix your problem or not. But give it a try.
Код:
//Change this
sscanf(line, "p<|>sdsddddddsdsdsdddddssdsdddddddddsdddddddddddddd"
//to this
sscanf(line, "p<|>s[128]ds[128]dddddds[128]ds[128]ds[128]ddddds[128]s[128]ds[128]ddddddddds[128]dddddddddddddd"
Quote:
Originally Posted by ******
If you don't enter a string length, sscanf assumes 32



Re: MySQL - Not Loading - Ashley - 12.10.2012

Quote:
Originally Posted by newbienoob
Посмотреть сообщение
I'm not sure if this will fix your problem or not. But give it a try.
Код:
//Change this
sscanf(line, "p<|>sdsddddddsdsdsdddddssdsdddddddddsdddddddddddddd"
//to this
sscanf(line, "p<|>s[128]ds[128]dddddds[128]ds[128]ds[128]ddddds[128]s[128]ds[128]ddddddddds[128]dddddddddddddd"
Nope :/

(repped for trying to help.)