Arry Problem :(
#1

How to fix this probleM?

F:\Danish\CNR\gamemodes\Cops&Robbers.pwn(32579) : error 033: array must be indexed (variable "string")
?

Error Line:
Код:
format(string, sizeof(string), "The Bank");
			if (HouseData[Houseid][h_OwnerName] == string)// error with this :(
			{
			ShowTextDrawMenu(playerid, TD_MENU_HOUSE,"~g~House", 12, 8);
			format(string, sizeof(string), "~p~%s~n~~w~Owner: ~b~%s~n~~w~For Sale ~g~$%d",HouseInfo[Houseid][h_HouseIntName],HouseData[Houseid][h_OwnerName],HouseData[Houseid][h_Value]);
			ShowTextDrawMenuItems(playerid, 0, string, " ", " ",0);
			ShowTextDrawMenuItems(playerid, 1,  " ", " ", " ",0);
			ShowTextDrawMenuItems(playerid, 2,  " ", " ", " ",0);
			ShowTextDrawMenuItems(playerid, 3,  " ", " ", " ",0);
			ShowTextDrawMenuItems(playerid, 4,  " ", " ", " ",0);
			ShowTextDrawMenuItems(playerid, 5, " ", "~y~1 ~w~- Enter This House", " " ,0);
			ShowTextDrawMenuItems(playerid, 6, " ", "~y~2 ~w~- Knock At The Door", " " ,0);
			ShowTextDrawMenuItems(playerid, 7, " ", "~y~3 ~w~- Attempt To Break In", " " ,0);
			ShowTextDrawMenuItems(playerid, 8, " ", "~y~4 ~w~- Visit This House", " " ,0);
			ShowTextDrawMenuItems(playerid, 9, " ", "~y~5 ~w~- Purchase This House", " " ,0);
			ShowTextDrawMenuItems(playerid, 10, " ", "~y~6 ~w~- Rent This House", " " ,0);
			}
Reply
#2

https://sampwiki.blast.hk/wiki/Strcmp
Reply
#3

please give me code
for if(HouseData[house][h_OwnerName] == i want this == to The Bank Name)
Reply
#4

pawn Код:
if(strcmp(HouseData[house][h_OwnerName], "The Bank", true) == 0)
Reply


Forum Jump:


Users browsing this thread: