Problem getting string variable
#1

Hi and thanks in advance for your help

In advance, I apologize for my bad english, is not my native language.

Look, I'm trying getting string variable from MYSQL. I get string perfectly from database but when use it as user variable it's as if there was void variable

Script of enum with player data and cache
PHP код:
enum ENUM_PLAYER_DATA
{
    
//more variables behind here
    
Clan[25],
    
CachePlayer_Cache,
    
bool:LoggedIn
}
new 
pInfo[MAX_PLAYERS][ENUM_PLAYER_DATA];
cache_get_value(0"Clan"pInfo[playerid][Clan]); 
LOG of MySQL plugin
Код HTML:
[23:11:58] [DEBUG] cache_get_value_name(0, "Clan", 0x03AD6C00, 1)
[23:11:58] [DEBUG] cache_get_value_name: assigned value: 'TAW'
PHP код:
if(strcmp(pInfo[playerid][Clan],"TAW",true))
            {
                new 
nombre[24], string[29];
                
GetPlayerName(playeridnombresizeof(nombre)); 
                
format(stringsizeof(string), "[%s]%s",pInfo[playerid][Clan], nombre);
                
SetPlayerName(playeridstring);
           }
           else
           {
            new 
string[29];
            
format(stringsizeof(string), "No eres TAW, eres: %s",pInfo[playerid][Clan]);
            
SendClientMessage(playeridCOLOR_REDstring);
           } 
I receive the SendClientMessage with empty string:
Код HTML:
[23:11:58] No eres TAW, eres:
Thanks in advance again!.
Reply


Messages In This Thread
Problem getting string variable - by dabv_astur - 11.11.2018, 01:33
Re: Problem getting string variable - by Jefff - 11.11.2018, 01:41
Re: Problem getting string variable - by dabv_astur - 11.11.2018, 02:18
Re: Problem getting string variable - by Jefff - 11.11.2018, 02:56
Re: Problem getting string variable - by dabv_astur - 11.11.2018, 03:02
Re: Problem getting string variable - by SyS - 11.11.2018, 03:05
Re: Problem getting string variable - by dabv_astur - 11.11.2018, 03:14
Re: Problem getting string variable - by dabv_astur - 14.11.2018, 00:54

Forum Jump:


Users browsing this thread: 1 Guest(s)