Help me Mysql
#1

PHP Code:
forward Characters_Menu(playerid);
public 
Characters_Menu(playerid)
{
    new 
str[64], dialog[512], C_IDC_LVLC_Name[32];
    
format(strsizeof(str), "C_ID\tCharacter Name\tLevel\n");
    
strcat(dialogstrsizeof(dialog));
    for( new 
id 0id cache_num_rows(); id++)
    {
        
cache_get_value(id"ID"C_ID);
        
cache_get_value(id"Name"C_Name32);
        
cache_get_value(id"Level"C_LVL);
        
format(strsizeof(str), "[%d] \t%s\t%d\n"C_IDC_NameC_LVL);
        
strcat(dialogstrsizeof(dialog));
    }
    if(
cache_num_rows() < 3
    {
        
format(strsizeof(str), " \tCreate Character\t\n");
        
strcat(dialogstrsizeof(dialog));
    }
    
format(strsizeof(str), "%s's Characters"Account[playerid][Name]);
    
Dialog_Show(playeridCharacter_SelectDIALOG_STYLE_TABLIST_HEADERSstrdialog"Select","Leave");
    return 
1;

PHP Code:
C:\Users\Administrator\Desktop\SAMP\gamemodes\SCRP-R39.pwn(1094) : error 035argument type mismatch (argument 3)
C:\Users\Administrator\Desktop\SAMP\gamemodes\SCRP-R39.pwn(1096) : error 035argument type mismatch (argument 3
HTML Code:
cache_get_value(id, "ID", C_ID);
cache_get_value(id, "Level", C_LVL);
I updated Mysql R39 to R41-4, but I can't fix it
Reply
#2

Someone help me
Reply
#3

The Gamemode Small Country RolePlay can't use mysql R41-4?
Reply
#4

cache_get_value_int
Reply
#5

Quote:

C:\Users\Administrator\Desktop\SAMP\gamemodes\SCRP-R39.pwn(1094) : error 017: undefined symbol "cache_get_value_int_ovrld"
C:\Users\Administrator\Desktop\SAMP\gamemodes\SCRP-R39.pwn(1096) : error 017: undefined symbol "cache_get_value_int_ovrld"

Quote:

C_ID = cache_get_value_int(id, "ID");
cache_get_value(id, "Name", C_Name, 24);
C_LVL = cache_get_value_int(id, "Level");

No working.
Reply
#6

Quote:
Originally Posted by KeyOfKey
View Post
cache_get_value_int
PHP Code:
forward Characters_Fetch(playerid);
public 
Characters_Fetch(playerid)
{
    new 
query[128];
    
mysql_format(SQL_CONNECTIONquerysizeof(query), "SELECT ID, Name, Level FROM Characters WHERE A_ID = '%d' LIMIT 3"Account[playerid][SQLID]);
    
mysql_tquery(SQL_CONNECTIONquery"Characters_Menu""i"playerid);
    return 
1;
}
forward Characters_Menu(playerid);
public 
Characters_Menu(playerid)
{
    new 
str[64], dialog[512], C_IDC_Name[24], C_LVL;
    
format(strsizeof(str), "C_ID\tCharacter Name\tLevel\n");
    
strcat(dialogstrsizeof(dialog));
    for( new 
id 0id cache_num_rows(); id++)
    {
        
C_ID cache_get_value_int(id"ID"Character[playerid][ID]);
        
cache_get_value(id"Name"C_Name24);
        
C_LVL cache_get_value_int(id"Level"Character[playerid][Level]);
        
format(strsizeof(str), "[%d] \t%s\t%d\n"C_IDC_NameC_LVL);
        
strcat(dialogstrsizeof(dialog));
    }
    if(
cache_num_rows() < 3
    {
        
format(strsizeof(str), " \tCreate Character\t\n");
        
strcat(dialogstrsizeof(dialog));
    }
    
format(strsizeof(str), "%s's Characters"Account[playerid][Name]);
    
Dialog_Show(playeridCharacter_SelectDIALOG_STYLE_TABLIST_HEADERSstrdialog"Select","Leave");
    return 
1;

I think Characters_Fetch(playerid) no working, how to fix it?
Reply
#7

I Fixed, tks bro so much.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)