[HELP] Saving/Restoring location
#8

having problems with this at the moment, im guessing it is because of the double mysql query's
Код:
stock LoadStats(playerid)
{
    new pName[24],Query[80],GetLoc[80];
    GetPlayerName(playerid,pName,24);
    format(Query,sizeof(Query), "SELECT * FROM `Users` WHERE `Username` = '%s';", pName);
    mysql_query(Query);
    mysql_store_result();
    mysql_fetch_row_format(Query, "|");
    sscanf(Query, "e<p<|>s[24]s[23]i>", PInfo[playerid]);
    mysql_free_result();
    format(GetLoc,sizeof(GetLoc), "SELECT `PosX`, `PosY`, `PosZ` FROM `Users` WHERE `Username` = '%s';", pName);
    mysql_query{GetLoc);
	mysql_store_result();
    mysql_fetch_row_format(GetLoc, "|");
    sscanf(Query2, "p<|>fff", UserStats[playerid][PosX], UserStats[playerid][PosY], UserStats[playerid][PosZ]);
    mysql_free_result();
    GivePlayerMoney(playerid,PInfo[playerid][Money]);
    SetSpawnInfo(playerid, 0, 230, UserStats[playerid][PosX], UserStats[playerid][PosY], UserStats[playerid][PosZ], 10, 0,0,0,0,0,0);
    SpawnPlayer(playerid);
    return 1;
}
It spits this up

Код:
C:\Users\Simon\Desktop\samp\gamemodes\bare.pwn(210) : error 028: invalid subscript (not an array or too many subscripts): "mysql_query"
C:\Users\Simon\Desktop\samp\gamemodes\bare.pwn(210) : warning 215: expression has no effect
C:\Users\Simon\Desktop\samp\gamemodes\bare.pwn(210) : error 001: expected token: ";", but found ")"
C:\Users\Simon\Desktop\samp\gamemodes\bare.pwn(210) : error 029: invalid expression, assumed zero
C:\Users\Simon\Desktop\samp\gamemodes\bare.pwn(210) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply


Messages In This Thread
[HELP] Saving/Restoring location - by simon92922 - 09.06.2012, 15:04
Re: [HELP] Saving/Restoring location - by JhnzRep - 09.06.2012, 15:05
Re: [HELP] Saving/Restoring location - by simon92922 - 09.06.2012, 15:08
Re: [HELP] Saving/Restoring location - by JhnzRep - 09.06.2012, 15:12
Re: [HELP] Saving/Restoring location - by simon92922 - 09.06.2012, 15:28
Re: [HELP] Saving/Restoring location - by JhnzRep - 09.06.2012, 15:33
Re: [HELP] Saving/Restoring location - by simon92922 - 09.06.2012, 15:37
Re: [HELP] Saving/Restoring location - by simon92922 - 09.06.2012, 16:07
Re: [HELP] Saving/Restoring location - by simon92922 - 09.06.2012, 16:21
Re: [HELP] Saving/Restoring location - by simon92922 - 09.06.2012, 16:40

Forum Jump:


Users browsing this thread: 1 Guest(s)