06.05.2013, 12:09
(
Последний раз редактировалось Dj_maryo1993; 06.05.2013 в 12:47.
)
Ok so i got this function :
Wich load something frome the DB
I call it like this
The problem is with the "sscanf" line ,because i get the "pass1" print , but "pass2" or further are not shown.
Here is The DB
.
Also , the query returns correct info
Any thots on what's wrong here ?
LE : Solved
pawn Код:
public LoadPickup(sqlid)
{
new query[128];
new wholehouse[256];
format(query, sizeof(query), "SELECT * FROM `pickups` WHERE `id` = '%d'", sqlid);
mysql_query(query);
mysql_store_result();
mysql_fetch_row(wholehouse);
printf("pass1");
sscanf(wholehouse, "p<|>iiifffs[64]",PickupInfo[ploadet][id],PickupInfo[ploadet][modell],PickupInfo[ploadet][tip],PickupInfo[ploadet][Cx],PickupInfo[ploadet][Cy],PickupInfo[ploadet][Cz],PickupInfo[ploadet][texxt]);
printf("pass2");
CreatePickup(PickupInfo[ploadet][modell],PickupInfo[ploadet][tip],PickupInfo[ploadet][Cx],PickupInfo[ploadet][Cy],PickupInfo[ploadet][Cz],-1);
printf("pass3");
Create3DTextLabel(PickupInfo[ploadet][texxt], 0xFFFF00AA,PickupInfo[ploadet][Cx],PickupInfo[ploadet][Cy],PickupInfo[ploadet][Cz] , 30.0, sqlid, 0);
ploadet++;
mysql_free_result();
printf("pass4");
return 1;
}
I call it like this
pawn Код:
/* Cars /factiones /houses/bizz and much more loadet the same way above,all works corectly*/
mysql_query("SELECT NULL FROM `pickups`");
mysql_store_result();
picktot = mysql_num_rows();
mysql_free_result();
printf("There are %d pickups",picktot);
for(new i = 1; i < picktot+1; i++)
{
LoadPickup(i);
}
printf("ALL STATIC LOADET FROM MYSQL");
return 1;
Here is The DB
![](http://i39.tinypic.com/2qtk93o.jpg)
Also , the query returns correct info
Код:
Function: mysql_fetch_row executed with result: "1|1239|23|361.939|173.726|1008.38|/jobs"
LE : Solved