Formatting and adding MySQL cache'd values wont work properly
#1

Basically, what I'm trying to do is make the dialog show as:
Quote:
TEXT AS TABHEADER
35
Michael
Griffin
Alive
ID
Firstname
Surname
Status
But it's only providing me with the SQLID, but nothing else.. Here's my current callback code;
PHP код:
    forward public OnPlayerLoadCharacters(playerid);
    public 
OnPlayerLoadCharacters(playerid) {
        new 
dialog[524];
        
format(dialog524"{A6856A}Please select your character to spawn");
        if(
cache_num_rows()) {
            for(new 
id 0id cache_num_rows(); id++) {
                new 
sqlidstring[144], firstname[MAX_PLAYER_NAME], surname[MAX_PLAYER_NAME], status;
                
cache_get_value_name_int(id"id"sqlid);
                
cache_get_value_name(id"firstname"firstname);
                
cache_get_value_name(id"surname"surname);
                
cache_get_value_name_int(id"status"status);
                
format(string144"\n%i\t%s\t%s\t%s"sqlidfirstnamesurnameCharStatus[status]);
                
strcat(dialogstring);
            }
            if(
cache_num_rows() < 6)
                
strcat(dialog"\n \n{A1724C}Create a new character");
        }
        else
            
strcat(dialog"\n{A1724C}Create a new character");
        
ShowPlayerDialog(playeridDIALOG_CHARACTERSDIALOG_STYLE_TABLIST_HEADERSDIALOG_TITLEdialog"Select""Cancel");
    } 
What am I doing wrong here?




Reply


Messages In This Thread
Formatting and adding MySQL cache'd values wont work properly - by Meller - 14.09.2017, 18:06
Re: Formatting and adding MySQL cache'd values wont work properly - by IstuntmanI - 15.09.2017, 01:55
Re: Formatting and adding MySQL cache'd values wont work properly - by Meller - 15.09.2017, 07:45

Forum Jump:


Users browsing this thread: 1 Guest(s)