Weired dialog problem
#1

Ok im making a new ban system for my server and i came on a problem that just pissing me off!
Long time i didnt ask for help here so its about a time :P
here is the problem:

I use mysql for ban system and i get every field right (debugged with printf )
Its print everything as it is in database
But now when i need to format it to dialog its just get bugged on "Reason"
Its show me in dialog Reason: and nothing behind it (even printf says Test and in database is test)

here is code and it looks fine to me...
As you can see i commented that ? switch after reason thats also to debug script so with or without it its same

pawn Код:
while(mysql_fetch_row(Query))//These will loop untill server dont get all fields
        {
                mysql_fetch_field_row(UserName,"UserName");
                mysql_fetch_field_row(AdminName,"AdminName");
                mysql_fetch_field_row(IP,"IP");
                mysql_fetch_field_row(BanReason,"Reason");
                printf("Reason: %s",BanReason);
                mysql_fetch_field_row(BanType,"Type");//Dont forget to stval it !!!
                mysql_fetch_field_row(BanTime,"BanTime");
                mysql_fetch_field_row(BanUntil,"BanUntil");

                new String[300];
                format(String,sizeof(String),"User name: %s\n\
                                              Admin name: %s\n\
                                              IP: %s\n\
                                              Reason: %s\n\
                                              Type: %d\n\
                                              Baned: %s\n\
                                              Until: %s\n\
                                              You can complain at\n\
                                              www.driftersparadise.co.cc"
,UserName,
                                                                          AdminName,
                                                                          IP,
                                                                          BanReason,
                                                                          BanType,// ? ("Temporary") : ("Dynamic"),
                                                                          BanTime,
                                                                          BanUntil);

                ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX,embed_red"Banned", String,"Ok","");
        }
Anyone have idea why is these happens ? Its only on Reason everything else is fine...
Reply
#2

Perhaps print the full string?
Reply
#3

Quote:
Originally Posted by varthshenon
Посмотреть сообщение
Perhaps print the full string?
Just printed full string and it does not show reason string

pawn Код:
[03:15:57] Reason: Test
[03:15:57] User name: Ice
Admin name: Banhumer
IP: 169.254.203.109
Reason:
Type: 1
Baned: 9.7.2011.02.14
Until: 9.7.2012.02.15
You can complain at
[url]www..co.cc[/url]
As you can see that reason on top is from printf when i get field and its showing correct...
Reply
#4

Is you Database setup right? make sure the reason column matches the other columns with strings in terms of structure
Reply
#5

Quote:
Originally Posted by dowster
Посмотреть сообщение
Is you Database setup right? make sure the reason column matches the other columns with strings in terms of structure
Its matching and its stored into the string varibale right
Reply
#6

print BanReason in each line from:
pawn Код:
mysql_fetch_field_row(BanType,"Type");
to:
pawn Код:
new String[300];
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)