error 033: array must be indexed (variable "name") - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: error 033: array must be indexed (variable "name") (
/showthread.php?tid=324213)
error 033: array must be indexed (variable "name") -
deimantas1 - 08.03.2012
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();
}
Re: error 033: array must be indexed (variable "name") -
[XST]O_x - 08.03.2012
Replace:
With:
pawn Code:
if(!strcmp(name, skaicius))
Re: error 033: array must be indexed (variable "name") -
MadeMan - 08.03.2012
pawn Code:
if(strcmp(name,skaicius) == 0)
Re: error 033: array must be indexed (variable "name") -
deimantas1 - 08.03.2012
Always show that he is not standing on the pickup.
Re: error 033: array must be indexed (variable "name") -
deimantas1 - 08.03.2012
Quote:
Originally Posted by MadeMan
pawn Code:
if(strcmp(name,skaicius) == 0)
|
Thanks.