CallBackFunction MYSQL cached
#6

Can't I just assign Player[playerid][FactionName] = inputtext[120] under my dialogresponse.
Then call Player[playerid][FactionName] to UPDATE my `factionname` under my `account` table. i tried this and tried priting Player[playerid][FactionName] it prints me empty string. What am I doing wrong?

PHP код:
case factionnamed:
        {
            new 
query[500];
            
mysql_format(mysql,query,sizeof(query), "INSERT INTO `faction` (`factionname`) VALUES ('%e')",inputtext);
            
mysql_tquery(mysqlquery"callBackFunction""i",playerid);
            
Player[playerid[FactionName] = inputtext[120];
            
mysql_format(mysql,query,sizeof(query), "UPDATE `accounts` SET `factionname` = %e `factionid` = %d WHERE ID %d LIMIT 1"Player[playerid][FactionName], Faction[playerid][ID], Player[playerid][ID]);
            
mysql_tquery(mysql,query,"","");
            
         } 
Under my command where i assign dialog is like this
PHP код:
CMD:createfaction(playerid,params[])
{
    if(
Player[playerid][Admin] < 4) return SendClientMessage(playeridCOLOR_GREY"You must be an adminstrator to use this command");
    
ShowPlayerDialog(playeridfactionnamedDIALOG_STYLE_INPUT"Faction Creation""Enter the faction name""Next","Cancel");
    return 
1;

Under enums, I have
PHP код:
enum PlayerData
{
    
ID,
    
Name[MAX_PLAYER_NAME],
    
Password[129],
    
IP[16],
    
Admin,
    
VIP,
    
FactionID,
    
FactionName[200],
    
Money,
    
Float:posX,
    
Float:posY,
    
Float:posZ,
    
Float:posA
};
new 
Player[MAX_PLAYERS][PlayerData]; 
PHP код:
enum FactionData
{
    
ID,
    
factionname[200],
    
factiontype
};
new 
Faction[MAX_PLAYERS][FactionData]; 
Reply


Messages In This Thread
CallBackFunction MYSQL cached - by DavidLuango - 30.07.2016, 09:29
Re: CallBackFunction MYSQL cached - by DavidLuango - 30.07.2016, 16:13
Re: CallBackFunction MYSQL cached - by Gammix - 30.07.2016, 16:19
Re: CallBackFunction MYSQL cached - by DavidLuango - 30.07.2016, 16:41
Re: CallBackFunction MYSQL cached - by DavidLuango - 30.07.2016, 16:54
Re: CallBackFunction MYSQL cached - by DavidLuango - 30.07.2016, 18:03
Re: CallBackFunction MYSQL cached - by Gammix - 30.07.2016, 18:36
Re: CallBackFunction MYSQL cached - by Konstantinos - 30.07.2016, 19:02
Re: CallBackFunction MYSQL cached - by Gammix - 30.07.2016, 19:12
Re: CallBackFunction MYSQL cached - by DavidLuango - 30.07.2016, 21:05

Forum Jump:


Users browsing this thread: 4 Guest(s)