SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 10/07/2019, 08:18 AM   #1
Libbyphay
Big Clucker
 
Join Date: May 2017
Posts: 194
Reputation: 0
Default Help me Mysql

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

Last edited by Libbyphay; 10/07/2019 at 09:01 AM.
Libbyphay is offline   Reply With Quote
Old 10/07/2019, 09:28 AM   #2
Libbyphay
Big Clucker
 
Join Date: May 2017
Posts: 194
Reputation: 0
Default Re: Help me Mysql

Someone help me
Libbyphay is offline   Reply With Quote
Old 10/07/2019, 09:40 AM   #3
Libbyphay
Big Clucker
 
Join Date: May 2017
Posts: 194
Reputation: 0
Default Re: Help me Mysql

The Gamemode Small Country RolePlay can't use mysql R41-4?
Libbyphay is offline   Reply With Quote
Old 10/07/2019, 09:45 AM   #4
Symon
Gangsta
 
Symon's Avatar
 
Join Date: Apr 2019
Location: Italy
Posts: 918
Reputation: 89
Default Re: Help me Mysql

cache_get_value_int
Symon is offline   Reply With Quote
Old 10/07/2019, 09:50 AM   #5
Libbyphay
Big Clucker
 
Join Date: May 2017
Posts: 194
Reputation: 0
Default Re: Help me Mysql

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.
Libbyphay is offline   Reply With Quote
Old 10/07/2019, 09:53 AM   #6
Libbyphay
Big Clucker
 
Join Date: May 2017
Posts: 194
Reputation: 0
Default Re: Help me Mysql

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?
Libbyphay is offline   Reply With Quote
Old 10/07/2019, 10:25 AM   #7
Libbyphay
Big Clucker
 
Join Date: May 2017
Posts: 194
Reputation: 0
Default Re: Help me Mysql

I Fixed, tks bro so much.
Libbyphay is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL Plugin r39-2 Error: Can't connect to local MySQL server through socket Emre__ Scripting Help 10 30/07/2014 08:26 AM
[Tutorial] [VIDEO] MySQL ORM r38: How to pair GM with MySQL & creation of registration/connection system cArnasLT Tutorials 3 19/05/2014 02:08 PM
Mysql queriesYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for th audriuxxx Scripting Help 4 11/04/2014 06:42 PM
BlueG MySQL plugin - Failed (plugins/mysql.so: undefined symbol: _Z13stringvprintfPKcPc) linuxthefish Plugin Development 10 13/07/2013 10:56 AM
[Tool/Web/Other] MySQL DB Manager - Easily manage your MySQL databases with this remote application fiki574 Tools and Files 13 22/07/2012 09:41 AM


All times are GMT. The time now is 04:55 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.