Folgendes gibt "Fehler im SSCANF" aus, aber warum?
new shID = random(cID)+1,Float:shPosX,Float:shPosY,Float:shPosZ;
format(query, sizeof(query),"SELECT * FROM Positions WHERE ID='%d'",shID);
mysql_query(query);
mysql_store_result(); new resultline[200];
if(mysql_fetch_row_format(resultline,"|"))
{
new ret = sscanf(resultline,"p<|>ifff",shID,shPosX,shPosY,shPosZ);
if(ret == -1)print("Fehler im SSCANF");
}
mysql_free_result();
Folgende Query gibt für jede Variable 0 aus
mysql_query("SELECT * FROM `div` WHERE `var` = '1'");
mysql_store_result(); new resultline[200],remove;
if(mysql_fetch_row_format(resultline))
{
sscanf(resultline,"p<|>dddddddddd",remove,dVar[0][0],dVar[0][1],dVar[1][0],dVar[1][1],dVar[2][0],dVar[2][1],dVar[3][0],dVar[3][1]);
}
else printf("MySQL-Query Fehler");
mysql_free_result();
Warum?
mfg HB