Pickup doesnt create.
#1

Hello, Ive created a script where it loads houses from db. so hares the part of the script that doesnt work.

Код:
stock LoadHouses()
{
	new
		Str[255],
		hID,
		Float:intX,
		Float:intY,
		Float:intZ,
		Float:exitX,
		Float:exitY,
		Float:exitZ,
		hOwner[24],
		hWorld,
		hPrice,
		hIntID,
		hLocked;

	mysql_query("SELECT * FROM `houses`");
	mysql_store_result();
	new haI = 1;
    if(mysql_num_rows() > 0)
    {
        while(mysql_fetch_row(Str))
        {
		    sscanf(Str, "p<|>is[128]s[24]ffffffiiii", hID, intX, intY, intZ, exitX, exitY, exitZ, hOwner, hWorld, hPrice, hIntID, hLocked);
		    HousePickup[hID] = CreatePickup(1273, 1, exitX, exitY, exitZ, 0);
		    iHos[haI][haID] = haI;
		    iHos[haI][haExitX] = exitX;
			iHos[haI][haExitY] = exitY;
			iHos[haI][haExitZ] = exitZ;
			iHos[haI][haIntX] = intX;
			iHos[haI][haIntY] = intY;
			iHos[haI][haIntZ] = intZ;
			iHos[haI][haIntID] = hIntID;
			iHos[haI][haPrice] = hPrice;
			iHos[haI][haLocked] = hLocked;
			iHos[haI][haWorld] = hWorld;
			format(iHos[haI][haOwner], 24, "%s", hOwner);
			haI++;
			hTotal++;
		}
	}
	mysql_free_result();
	printf("** %i\t<->\tHouses Loaded from\t<->\tMySQL\t\t   **", hTotal);

	
	return 1;
}
So, it doesnt load the pickup, why is that i wonder, I think its eather the pickup doesnt create cuz of wrong command, or cuz of something wrong getting the mysql data, tables are correct. any ideas?
Reply


Messages In This Thread
Pickup doesnt create. - by TheINCDope - 06.11.2014, 19:57
Re: Pickup doesnt create. - by CNMike - 06.11.2014, 20:00
Re: Pickup doesnt create. - by TheINCDope - 06.11.2014, 20:23
Re: Pickup doesnt create. - by CNMike - 06.11.2014, 20:31
Re: Pickup doesnt create. - by CNMike - 06.11.2014, 20:39
Re: Pickup doesnt create. - by TheINCDope - 06.11.2014, 20:45
Re: Pickup doesnt create. - by CNMike - 06.11.2014, 20:48
Re: Pickup doesnt create. - by TheINCDope - 06.11.2014, 20:58

Forum Jump:


Users browsing this thread: 1 Guest(s)