MySQL Query
#2

Well the debugging you've added wouldn't help much since you did it before you even used sscanf to split up the results.

pawn Код:
new query [256], result[256], Float:X, Float:Y, Float:Z, Float:A;
        format(query,256,"SELECT `x`,`y`,`z`,`ang` FROM factions WHERE id = '%d'",playerinfo[playerid][Faction]);
        mysql_query(query);
        mysql_store_result();
        mysql_fetch_row(result);
        printf("Result contents: %s",result);
        sscanf(result,"ffff",X,Y,Z,A);
        printf("X: %f", X);
        printf("Y: %f", Y);
        printf("Z: %f", Z);
        mysql_free_result();
        SetPlayerPos(playerid, X, Y, Z);
        SetPlayerFacingAngle(playerid, A);
        SetPlayerInterior(playerid, 0);
That should give you a better idea of wether the query is working or not and what information is coming back
Reply


Messages In This Thread
MySQL Query - by Agent Smith - 11.08.2010, 19:30
Re: MySQL Query - by JaTochNietDan - 11.08.2010, 19:37
Re: MySQL Query - by Agent Smith - 11.08.2010, 19:41
Re: MySQL Query - by JaTochNietDan - 11.08.2010, 19:43
Re: MySQL Query - by Agent Smith - 11.08.2010, 19:45
Re: MySQL Query - by JaTochNietDan - 11.08.2010, 19:47
Re: MySQL Query - by Agent Smith - 11.08.2010, 19:49

Forum Jump:


Users browsing this thread: 1 Guest(s)