array must be indexed
#1

PHP код:
CMD:getreg(playerid, params[])
{
    if (
PlayerInfo[playerid][pAdmin] < 8) return true;
    if(
sscanf(params,"s[24]",params[0])) return    SCM(playerid, COLOR_WHITE, "Введите: /getreg [Acc Name]");
    new 
query_mysql[90];
    
format(query_mysql, sizeof(query_mysql), "SELECT * FROM accounts WHERE Name = '%s'", params[0]);
    
mysql_function_query(dbHandle, query_mysql, true, "GetStats", "i", playerid);
    return 
true;
}
publics: GetStats(playerid, query[])
{
    new 
rows, fields;
    
cache_get_data(rows, fields);
    if(
rows)
    {
        new 
vresult[64];
        new 
level,money,bank,warn,banstatus,VIP,donate;
        new 
datareg[24],ipk[24],regip[24];
        new 
str[128],sctring[1000];
        
cache_get_field_content(0,"Level", vresult);level = strval(vresult);
        
cache_get_field_content(0,"Money", vresult);money = strval(vresult);
        
cache_get_field_content(0,"Bank", vresult);bank = strval(vresult);
        
cache_get_field_content(0,"Warns", vresult);warn = strval(vresult);
        
cache_get_field_content(0,"BanStatus", vresult);banstatus = strval(vresult);
        
cache_get_field_content(0,"VIP", vresult);VIP = strval(vresult);
        
cache_get_field_content(0,"DonateMoney", vresult);donate = strval(vresult);
        
        
cache_get_field_content(0,"DataReg", vresult);datareg = strval(vresult);
        
cache_get_field_content(0,"IP", vresult);ipk = strval(vresult);
        
cache_get_field_content(0,"IpReg", vresult);regip = strval(vresult);
        
        
format(str,sizeof(str),"Level:      \t\t%d\n",level);strcat(sctring,str);
        
format(str,sizeof(str),"Fuli Xelze:      \t\t%d\n",money);strcat(sctring,str);
        
format(str,sizeof(str),"Bank:          \t\t%d\n",bank);strcat(sctring,str);
        
format(str,sizeof(str),"Warns:      \t\t%d\n",warn);strcat(sctring,str);
        
format(str,sizeof(str),"BanStatus:      \t\t%d\n",banstatus);strcat(sctring,str);
        
format(str,sizeof(str),"VIP:      \t\t%d\n",VIP);strcat(sctring,str);
        
format(str,sizeof(str),"Donate:      \t\t%d\n",donate);strcat(sctring,str);
        
format(str,sizeof(str),"RegDate:      \t\t%s\n",datareg);strcat(sctring,str);
        
format(str,sizeof(str),"IP Adress:      \t\t%s\n",ipk);strcat(sctring,str);
        
format(str,sizeof(str),"IP Adres(Reg):      \t\t%s\n",regip);strcat(sctring,str);
        
ShowPlayerDialog(playerid,22815,DIALOG_STYLE_MSGBOX,"офф статистика",sctring,"закрыть","");
    }
    else 
SCM(playerid, 0xFF0000AA, "игрок не найден.");
    return 
true;
} 

PHP код:
error 033: array must be indexed (variable "datareg")
error 033: array must be indexed (variable "ipk")
error 033: array must be indexed (variable "regip") 
строчки

PHP код:
        cache_get_field_content(0,"DataReg", vresult);datareg = strval(vresult); 
        
cache_get_field_content(0,"IP", vresult);ipk = strval(vresult); 
        
cache_get_field_content(0,"IpReg", vresult);regip = strval(vresult); 
Не понял в чем проблема,подскажите пожалуйста
Reply


Messages In This Thread
array must be indexed - by FaGo - 18.08.2015, 08:55
Re: array must be indexed - by xJester - 18.08.2015, 09:46
Re: array must be indexed - by FaGo - 18.08.2015, 09:49
Re: array must be indexed - by S4D - 18.08.2015, 09:49
Re: array must be indexed - by FaGo - 18.08.2015, 10:23

Forum Jump:


Users browsing this thread: 1 Guest(s)