The server has been crashed by native mysql_fetch_field_row at address 41ac in script gamemodes\RRP.amx. |
stock MySQL_Login(playerid)
{
new query[300], pname[24], savingstring[20];
GetPlayerName(playerid, pname, 24);
format(query, sizeof(query), "SELECT * FROM users WHERE name = '%s' LIMIT 1", pname);
mysql_query(query);
mysql_store_result();
while(mysql_fetch_row_format(query,"|"))
{
mysql_fetch_field_row(savingstring, "level"); SetPlayerScore(playerid, strval(savingstring));
ResetPlayerMoney(playerid);
mysql_fetch_field_row(savingstring, "money"); GivePlayerMoney(playerid, strval(savingstring));
mysql_fetch_field_row(savingstring, "Adminlevel"); Playerdata[playerid][Adminlevel] = strval(savingstring);
mysql_fetch_field_row(savingstring, "bank"); Playerdata[playerid][Bank] = strval(savingstring);
mysql_fetch_field_row(savingstring, "exp"); Playerdata[playerid][Exp] = strval(savingstring);
mysql_fetch_field_row(savingstring, "tut"); Playerdata[playerid][Bank] = strval(savingstring);
mysql_fetch_field_row(savingstring, "xpos"); Playerdata[playerid][Xpos] = strval(savingstring);
mysql_fetch_field_row(savingstring, "ypos"); Playerdata[playerid][Ypos] = strval(savingstring);
mysql_fetch_field_row(savingstring, "zpos"); Playerdata[playerid][Zpos] = strval(savingstring);
mysql_fetch_field_row(savingstring, "apos"); Playerdata[playerid][Apos] = strval(savingstring);
mysql_fetch_field_row(savingstring, "tut"); Playerdata[playerid][Tut] = strval(savingstring);
}
mysql_free_result();
SendClientMessage(playerid, -1, "You have been logged in.");
SetSpawnInfo(playerid, -1, Playerdata[playerid][Skin], Playerdata[playerid][Xpos], Playerdata[playerid][Ypos], Playerdata[playerid][Zpos], Playerdata[playerid][Apos], -1, -1, -1, -1, -1, -1);
SpawnPlayer(playerid);
return 1;
}
CREATE TABLE IF NOT EXISTS `users` ( `id` int(10) NOT NULL AUTO_INCREMENT, `name` varchar(225) NOT NULL, `password` text NOT NULL, `skin` int(5) NOT NULL DEFAULT '101', `Adminlevel` enum('0','1','2','3','4','5','6','7','1337','1338') NOT NULL DEFAULT '0', `ip` varchar(20) NOT NULL, `money` int(225) NOT NULL DEFAULT '5000', `bank` int(225) NOT NULL DEFAULT '2500', `level` int(10) NOT NULL DEFAULT '1', `exp` int(10) NOT NULL DEFAULT '0', `xpos` float NOT NULL DEFAULT '1685.84', `ypos` float NOT NULL DEFAULT '-2333.34', `zpos` float NOT NULL DEFAULT '-2.6797', `apos` float NOT NULL DEFAULT '1.4551', `tut` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
mysql_fetch_field_row(savingstring, "level"); SetPlayerScore(playerid, strval(savingstring));
mysql_fetch_field_row(savingstring, "money"); GivePlayerMoney(playerid, strval(savingstring));
mysql_fetch_field_row(savingstring, "Adminlevel"); Playerdata[playerid][Adminlevel] = strval(savingstring);
mysql_fetch_field_row(savingstring, "bank"); Playerdata[playerid][Bank] = strval(savingstring);
mysql_fetch_field_row(savingstring, "exp"); Playerdata[playerid][Exp] = strval(savingstring);
mysql_fetch_field_row(savingstring, "tut"); Playerdata[playerid][Bank] = strval(savingstring);
mysql_fetch_field_row(savingstring, "xpos"); Playerdata[playerid][Xpos] = strval(savingstring);
mysql_fetch_field_row(savingstring, "ypos"); Playerdata[playerid][Ypos] = strval(savingstring);
mysql_fetch_field_row(savingstring, "zpos"); Playerdata[playerid][Zpos] = strval(savingstring);
mysql_fetch_field_row(savingstring, "apos"); Playerdata[playerid][Apos] = strval(savingstring);
mysql_fetch_field_row(savingstring, "tut"); Playerdata[playerid][Tut] = strval(savingstring);
MySQL_Login(playerid)
{
new query[67], pname[24], savingstring[64];
GetPlayerName(playerid, pname, 24);
format(query, sizeof(query), "SELECT * FROM users WHERE name = '%s' LIMIT 1", pname);
mysql_query(query);
mysql_store_result();
if(mysql_fetch_row_format(savingstring,"|"))
{
mysql_fetch_field_row(savingstring, "level"); SetPlayerScore(playerid, strval(savingstring));
ResetPlayerMoney(playerid);
mysql_fetch_field_row(savingstring, "money"); GivePlayerMoney(playerid, strval(savingstring));
mysql_fetch_field_row(savingstring, "Adminlevel"); Playerdata[playerid][Adminlevel] = strval(savingstring);
mysql_fetch_field_row(savingstring, "bank"); Playerdata[playerid][Bank] = strval(savingstring);
mysql_fetch_field_row(savingstring, "exp"); Playerdata[playerid][Exp] = strval(savingstring);
mysql_fetch_field_row(savingstring, "tut"); Playerdata[playerid][Bank] = strval(savingstring);
mysql_fetch_field_row(savingstring, "xpos"); Playerdata[playerid][Xpos] = strval(savingstring);
mysql_fetch_field_row(savingstring, "ypos"); Playerdata[playerid][Ypos] = strval(savingstring);
mysql_fetch_field_row(savingstring, "zpos"); Playerdata[playerid][Zpos] = strval(savingstring);
mysql_fetch_field_row(savingstring, "apos"); Playerdata[playerid][Apos] = strval(savingstring);
mysql_fetch_field_row(savingstring, "tut"); Playerdata[playerid][Tut] = strval(savingstring);
}
mysql_free_result();
SendClientMessage(playerid, -1, "You have been logged in.");
SetSpawnInfo(playerid, -1, Playerdata[playerid][Skin], Playerdata[playerid][Xpos], Playerdata[playerid][Ypos], Playerdata[playerid][Zpos], Playerdata[playerid][Apos], -1, -1, -1, -1, -1, -1);
SpawnPlayer(playerid);
return 1;
}
MySQL_Login(playerid)
{
new query[67], pname[24], savingstring[250];
GetPlayerName(playerid, pname, 24);
format(query, sizeof(query), "SELECT level, money, Adminlevel, bank, exp, xpos, ypos, zpos, apos, tut FROM users WHERE name = '%s' LIMIT 1", pname);
mysql_query(query);
mysql_store_result();
if(mysql_fetch_row_format(savingstring))
{
sscanf(savingstring,"p<|>iiiiiffffi", Playerdata[playerid][Level], Playerdata[playerid][Money], Playerdata[playerid][Adminlevel], Playerdata[playerid][Bank], Playerdata[playerid][Exp], Playerdata[playerid][Xpos], Playerdata[playerid][Ypos], Playerdata[playerid][Zpos], Playerdata[playerid][Apos], Playerdata[playerid][Tut]);
}
mysql_free_result();
SendClientMessage(playerid, -1, "You have been logged in.");
SetSpawnInfo(playerid, -1, Playerdata[playerid][Skin], Playerdata[playerid][Xpos], Playerdata[playerid][Ypos], Playerdata[playerid][Zpos], Playerdata[playerid][Apos], -1, -1, -1, -1, -1, -1);
SpawnPlayer(playerid);
return 1;
}
CMD:stats(playerid, params[])
{
SendClientMessage(playerid, COLOR_YELLOW, "______________|Stats|______________");
format(string, sizeof(string), "Level: %i - Exp: %i - Skin: %i", GetPlayerScore(playerid), Playerdata[playerid][Exp], GetPlayerSkin(playerid));
SendClientMessage(playerid, COLOR_YELLOW, string);
format(string, sizeof(string), "Money: %f - Bank: %f - Tutorial: %i", GetPlayerMoney(playerid), Playerdata[playerid][Bank], Playerdata[playerid][Tut]);
SendClientMessage(playerid, COLOR_YELLOW, string);
return 1;
}
SELECT skin, Adminlevel, money, bank, level, exp, xpos, ypos, zpos, apos, tut FROM users WHERE name = '%s' LIMIT 1 |
[20:17:48] CMySQLHandler::Query(SELECT skin, adminlevel, money, bank, level, exp, xpos, ypos, zpos) - An error has occured. (Error ID: 1054, Unknown column 'skin' in 'field list') |
CREATE TABLE IF NOT EXISTS `users` ( `id` int(10) NOT NULL AUTO_INCREMENT, `name` varchar(225) NOT NULL, `password` text NOT NULL, `skin` int(5) NOT NULL DEFAULT '101', `adminlevel` enum('0','1','2','3','4','5','6','7','1337','1338' ) NOT NULL DEFAULT '0', `ip` varchar(20) NOT NULL, `money` int(225) NOT NULL DEFAULT '5000', `bank` int(225) NOT NULL DEFAULT '2500', `level` int(10) NOT NULL DEFAULT '1', `exp` int(10) NOT NULL DEFAULT '0', `xpos` float NOT NULL DEFAULT '1685.84', `ypos` float NOT NULL DEFAULT '-2333.34', `zpos` float NOT NULL DEFAULT '-2.6797', `apos` float NOT NULL DEFAULT '1.4551', `tut` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; |