error 033: array must be indexed (variable "name")
#1

Hi,

Error:
Code:
error 033: array must be indexed (variable "name")
Error line:
Code:
if(name == skaicius)
All code:
Code:
	if(pickupid == verslasorouostas)
	{
		new query[200];
		format(query,200,"SELECT `Vardas` FROM `verslai` WHERE `Verslas` = 'OroUostas' ");
		mysql_query(query);
		mysql_store_result();
		if(mysql_num_rows()==1)
		{
			if(mysql_retrieve_row())
			{
			    new name[MAX_PLAYER_NAME];
			    GetPlayerName(playerid,name,MAX_PLAYER_NAME);
			    new skaicius[200];
				mysql_fetch_field_row(skaicius,"Vardas");
				if(name == skaicius)
				{
				    SendClientMessage(playerid,RAUDONA,"Jūs");
				}else{
					SendClientMessage(playerid,RAUDONA,"Ne jūs");
				}
				mysql_get_field("Vardas",skaicius);
			}
		}else{
		    SendClientMessage(playerid,RAUDONA,"Nлra savininko");
		}
	    mysql_free_result();
	}
Reply
#2

Replace:
pawn Code:
if(name == skaicius)
With:
pawn Code:
if(!strcmp(name, skaicius))
Reply
#3

pawn Code:
if(strcmp(name,skaicius) == 0)
Reply
#4

Always show that he is not standing on the pickup.
Reply
#5

Quote:
Originally Posted by MadeMan
View Post
pawn Code:
if(strcmp(name,skaicius) == 0)
Thanks.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)