25.05.2014, 12:30
So i've got a problem, it wont load the data, and i don't know why, can't find any mistakes, please help me.
So this is thread after entering the password:
and this thread leads us to this stock
This stock leads us back to:
and this is the data load
It wont load the data, on player spawn it's setted to give player a loaded skin but it doesn't and also as you can see it wont give the money, after loading the data.
So this is thread after entering the password:
pawn Код:
case THREAD_PASSCHECK:
{
mysql_store_result();
if(mysql_num_rows() == 0)
{
new str[250];
SCM(extraid, CRVENA, " (greska) Lozinka koju ste uneli nije ispravna !");
format(str, sizeof(str), "Dobrodosli na Roleplay Factory %s,\n\nVas nalog je uspesno pronadjen u nasoj bazi podataka !\nUpisite lozinku u polje ispod da se prijavite !", ImeIgraca(extraid));
SPD(extraid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Prijava", str, "Prijava", "Izlaz");
}
mysql_free_result();
Login(extraid);
}
and this thread leads us to this stock
pawn Код:
stock Login(playerid)
{
new Query[300];
format(Query, sizeof(Query), "SELECT * FROM `Igraci` WHERE `Ime` = '%s' LIMIT 1", ImeIgraca(playerid));
mysql_query(Query, THREAD_PRIJAVA, playerid);
return 1;
}
pawn Код:
case THREAD_PRIJAVA:
{
mysql_store_result();
if(mysql_num_rows() == 0) return SCM(extraid, CRVENA, "Greska pri ucitavanju accounta, pokusajte ponovo..."), Kick(extraid), mysql_free_result();
new linija[3096];
mysql_fetch_row(linija);
mysql_free_result();
LoadData(extraid, linija);
TogglePlayerSpectating(extraid, 0);
Ulogovan[extraid] = 1;
GivePlayerMoney(extraid, PI[extraid][Novac]);
SpawnPlayer(extraid);
}
pawn Код:
public LoadData(playerid, linija[])
{
sscanf(linija, "p<|>s[129]s[50]iiis[25]i", PI[playerid][Lozinka], PI[playerid][Email], PI[playerid][Novac], PI[playerid][Spol], PI[playerid][Godine], PI[playerid][Drzava], PI[playerid][Skin]);
}
It wont load the data, on player spawn it's setted to give player a loaded skin but it doesn't and also as you can see it wont give the money, after loading the data.