MySQL and sscanf not working good together [Reply only if you know about those 2]
#1

PHP код:
printf("Line: %s",line);
sscanf(line,"p<|>ds[128]",Info[playerid][MsgStatus],Message[playerid]); 
Ok, I got data I need from MySQL, to be sure I have printed string line. Now when I use sscanf to split it variables don't hold right values. I'm sure it's something really stupid. I'm breaking my head 2 days already.
I have printed Info[playerid][MsgStatus] and Message[playerid] after sscanf line. Below is code from server_log.txt.

Код:
[15:15:17] Line: 1|adasdasda
[15:15:17] Msg Status: 0
[15:15:17] Message:
Reply
#2

Nobody knows?
Reply
#3

Can you show where you SAVE those 2 values?
Reply
#4

You should use R7, it's much easier.
Reply
#5

Quote:
Originally Posted by [HK]Ryder[AN]
Посмотреть сообщение
Can you show where you SAVE those 2 values?
I don't save them anywhere. they are entered through website or direct access to Database through phpmyadmin.

@-Luis Maybe but MySQL isn't problem. You can clearly see that string line has values it should. Thing is that sscanf doesn't separate them good.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)