11.01.2014, 13:34
Hello everyone,
I'm currently stumped on this. I have been studying online to try and fix this but i have to resort to the SA-MP forums.
I will be grateful for your help
Here is the code that loads the houses into the server but is failing.
The problem is
I'm using MySQL r34 (linux) the error i get when compling this is as per followed,
Thank you if you need anymore info please reply.
I'm currently stumped on this. I have been studying online to try and fix this but i have to resort to the SA-MP forums.
I will be grateful for your help
Here is the code that loads the houses into the server but is failing.
pawn Код:
AddStoresFromMysql()
{
new Str[1000], id, Float:X, Float:Y, Float:Z, STotal;
// mysql_tquery("SELECT * FROM `stores`");
mysql_query(g_pSQL, "SELECT * FROM `stores`");
mysql_store_result();
while(mysql_fetch_row(g_pSQL, Str, "|"))
{
if(!mysql_num_rows()) continue;
sscanf(Str, "p<|>ifff",id, X, Y, Z);
print(Str);
CreateDynamicPickup(1274, 23, X, Y, Z, -1, -1, -1, PICKUPDISTANCE);
pickupdata[id][Type]=1;
CreateDynamic3DTextLabel("Store", -1, X, Y, Z, 100.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, TEXTLABELDISTANCE);
CreateDynamicMapIcon(X, Y, Z, 38, 0, -1, -1, -1, MAPICONDISTANCE);
printf("Store spawned at %f %f %f!",X,Y,Z);
STotal++;
}
mysql_free_result();
printf("** %i\t<->\tStores Loaded From\t<->\tMySQL\t\t **", STotal);
return 1;
}
The problem is
Код:
while(mysql_fetch_row(g_pSQL, Str, "|"))
Код:
CNR.pwn(5706) : error 035: argument type mismatch (argument 1)