Weirdest thing in the world.
#1

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.

Reply
#2

code... ¬¬
Reply
#3

Loading Factions:

http://pastebin.com/A73G0An2

Loading Houses:

http://pastebin.com/HtrQnfR3
Reply
#4

EDITED, Any help please?
Reply
#5

Still not solved.
Reply
#6

(If) When you were debugging it where was the fault in your code?
Reply
#7

There was NO fault.
Reply
#8

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)
Reply
#9

try checking if house exist, I had the same problem and when I add house check it works!
Reply
#10

Quote:
Originally Posted by Psymetrix
Посмотреть сообщение
pawn Код:
if(!(strcmp(HouseOwner[i], "Nobody", true)) && HousePrice[i] >= 1)
Does that help or am I mistaking?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)