Pickups and labels don't create
#1

Hello,

pawn Код:
stock LoadHouses()
{
    new IDHolder,Line[200],string[128];
    for(new h = 0; h < MAX_HOUSES; h ++)
    {
        format(QueryString,sizeof(QueryString),"SELECT * FROM `HouseInfo` WHERE `ID` = %d",h);
        mysql_query(QueryString);
        mysql_store_result();
        if(mysql_num_rows() == 1)
        {
            if(mysql_fetch_row(Line))
            {
                if(!sscanf(Line,"p<|>dffffffffffffffddds[24]",IDHolder,HouseInfo[h][PickupOutsidePosX],HouseInfo[h][PickupOutsidePosY],HouseInfo[h][PickupOutsidePosZ],HouseInfo[h][PickupInsidePosX],HouseInfo[h][PickupInsidePosY],HouseInfo[h][PickupInsidePosZ],
                HouseInfo[h][SpawnOutsideX],HouseInfo[h][SpawnOutsideY],HouseInfo[h][SpawnOutsideZ],HouseInfo[h][SpawnOutsideAngle],HouseInfo[h][SpawnInsideX],HouseInfo[h][SpawnInsideY],HouseInfo[h][SpawnInsideZ],HouseInfo[h][SpawnInsideAngle],
                HouseInfo[h][InteriorID],HouseInfo[h][Locked],HouseInfo[h][Price],HouseInfo[h][Owner]))
                {
                    if(!strcmp(HouseInfo[h][Owner],"NULL",false)) format(HouseInfo[h][Owner],MAX_PLAYER_NAME,"%s","\0");
                    if(isnull(HouseInfo[h][Owner]))
                    {
                        format(string,sizeof(string),"[House for sale]\nPrice: {FFFFFF}$%d",HouseInfo[h][Price]);
                        HouseInfo[h][Label] = Create3DTextLabel(string,COLOR_LIGHTGREEN,HouseInfo[h][PickupOutsidePosX],HouseInfo[h][PickupOutsidePosY],HouseInfo[h][PickupOutsidePosZ],10.0,-1,1);
                        HouseInfo[h][PickupID] = CreatePickup(1273,23,HouseInfo[h][PickupOutsidePosX],HouseInfo[h][PickupOutsidePosY],HouseInfo[h][PickupOutsidePosZ],-1);
                    }
                    else
                    {
                        format(string,sizeof(string),"[House NOT for sale]\nOwner: {FFFFFF}%s",HouseInfo[h][Owner]);
                        HouseInfo[h][Label] = Create3DTextLabel(string,COLOR_LIGHTGREEN,HouseInfo[h][PickupOutsidePosX],HouseInfo[h][PickupOutsidePosY],HouseInfo[h][PickupOutsidePosZ],30.0,-1,1);
                        HouseInfo[h][PickupID] = CreatePickup(1272,23,HouseInfo[h][PickupOutsidePosX],HouseInfo[h][PickupOutsidePosY],HouseInfo[h][PickupOutsidePosZ],-1);

                    }
                    printf("- HOUSE %d: X: %f || Y: %f || Z: %f",h,HouseInfo[h][PickupOutsidePosX],HouseInfo[h][PickupOutsidePosY],HouseInfo[h][PickupOutsidePosZ]);
                }
            }
        }
    }
    mysql_free_result();
}
The pickups and the labels of the code above here don't create. The positions etc all load fine, but the pickup and label don't create. What could be the problem?

Note: sscanf and MySQL is fine. I also used debug lines to see if it reaches the isnull, and it does!

Jochem
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)