Weirdest thing in the world. -
Dokins - 20.11.2011
I will post code when necessary:
Can someone tell me why this happens:
My houses load the pickups, names correctly, but the text doesnt appear saying for sale, but it appears on the faction pickup!? :S its so strange!! I can't get my head around it.
Loading Factions:
http://pastebin.com/A73G0An2
Loading Houses:
http://pastebin.com/HtrQnfR3
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
new string[256];
for(new i = 1; i < MAX_HOUSES; i++)
{
if(pickupid == HousePickup[i])
{
if(!strcmp(HouseOwner[i], "Nobody", true && HousePrice[i] >= 1))
{
format(string, sizeof(string), "~r~For Sale : %s~n~~w~Price: %d~n~~b~Type '/buyhouse' to purchase.", HouseName[i], HousePrice[i]);
}
else
{
format(string, sizeof(string), "Address: %s ~n~ Owner: %s", HouseName[i], HouseOwner[i]);
}
GameTextForPlayer(playerid, string, 3000, 5);
break;
}
}
return 1;
}
This might help.
Re: Weirdest thing in the world. -
DreamOnIt - 20.11.2011
code... ¬¬
Re: Weirdest thing in the world. -
Dokins - 20.11.2011
Loading Factions:
http://pastebin.com/A73G0An2
Loading Houses:
http://pastebin.com/HtrQnfR3
Re: Weirdest thing in the world. -
Dokins - 20.11.2011
EDITED, Any help please?
Re: Weirdest thing in the world. -
Dokins - 20.11.2011
Still not solved.
Re: Weirdest thing in the world. -
IceCube! - 20.11.2011
(If) When you were debugging it where was the fault in your code?
Re: Weirdest thing in the world. -
Dokins - 21.11.2011
There was NO fault.
Re: Weirdest thing in the world. -
Psymetrix - 21.11.2011
format(string, sizeof(string),
"~r~For Sale : %s~n~~w~Price: %d~n~~b~Type '/buyhouse' to purchase.", HouseName[i], HousePrice[i]);
Are you trying to say the red text doesn't appear?
Edit:
pawn Код:
if(!(strcmp(HouseOwner[i], "Nobody", true)) && HousePrice[i] >= 1)
Re: Weirdest thing in the world. -
System64 - 21.11.2011
try checking if house exist, I had the same problem and when I add house check it works!
Re: Weirdest thing in the world. -
Psymetrix - 21.11.2011
Quote:
Originally Posted by Psymetrix
pawn Код:
if(!(strcmp(HouseOwner[i], "Nobody", true)) && HousePrice[i] >= 1)
|
Does that help or am I mistaking?