Error 033: array must be indexed (variable "tmp2")
#1

Fixed!
Reply
#2

This should work.
PHP код:
new tmp2[16], savingstring[16];
format(query,sizeof(query), "SELECT IP FROM Accounts WHERE UserName='%s'"udb_encode(GetName(playerid)));
mysql_query(query);
mysql_store_result();
while(
mysql_fetch_row_format(query,"|"))
{
    
mysql_fetch_field_row(savingstring"IP"); 
    
strcat(tmp2savingstring);
}
mysql_free_result(); 
Reply
#3

Quote:
Originally Posted by PawnHunter
Посмотреть сообщение
This should work.
PHP код:
new tmp2[16], savingstring[16];
format(query,sizeof(query), "SELECT IP FROM Accounts WHERE UserName='%s'"udb_encode(GetName(playerid)));
mysql_query(query);
mysql_store_result();
while(
mysql_fetch_row_format(query,"|"))
{
    
mysql_fetch_field_row(savingstring"IP"); 
    
strcat(tmp2savingstring);
}
mysql_free_result(); 
Why do you even need tmp2 if you have savingstring?
But yes, that should work.
Reply
#4

Fixed!
Reply
#5

Because you're trying to assign an array without indexing.. I mean you can't do that:
PHP код:
new array[10];
array = 
0
but you can do that:
PHP код:
array[5] = 0
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)