mysql dosent save(:() -
romka - 26.01.2014
[php]]public Savestats(playerid)
{
GetPlayerHealth(playerid, Playerinfo[playerid][pHP]);
GetPlayerArmour(playerid, Playerinfo[playerid][pArmor]);
Playerinfo[playerid][pMoney] = GetPlayerCash(playerid);
Playerinfo[playerid][pSkin] = GetPlayerSkin(playerid);
GetPlayerPos(playerid, Playerinfo[playerid][pPosX], Playerinfo[playerid][pPosY], Playerinfo[playerid][pPosZ]);
format(Query, sizeof(Query), "UPDATE account SET `AdminLevel` = '%d', `Money` = '%d', `HP` = '%f', `Armor` = '%f', `Skin` = '%d', `RPTest` = '%d', `Kate1` = '%d', `Kate2` = '%d', `Kate3` = '%d', `PosX` = '%f', `PosY` = '%f', `PosZ` = '%f', `Fraction` = '%d', `FractionRank` = '%d', `Hospital` = '%d', `Age` = '%d', `Bank` = '%d', `Phone` = '%d', `PhoneNumber` = '%d', `UV` = '%d', `BankPin` = '%i', `IsOnHospital` = '%d' WHERE `Name` = '%s'",
Playerinfo[playerid][pAdminLevel],
Playerinfo[playerid][pMoney],
Playerinfo[playerid]
PHP код:
,
Playerinfo[playerid][pArmor],
Playerinfo[playerid][pSkin],
Playerinfo[playerid][pRPTest],
Playerinfo[playerid][pKate1],
Playerinfo[playerid][pKate2],
Playerinfo[playerid][pKate3],
Playerinfo[playerid][pPosX],
Playerinfo[playerid][pPosY],
Playerinfo[playerid][pPosZ],
Playerinfo[playerid][pFraction],
Playerinfo[playerid][pFractionRank],
Playerinfo[playerid][pHospital],
Playerinfo[playerid][pAge],
Playerinfo[playerid][pBank],
Playerinfo[playerid][pPhone],
Playerinfo[playerid][pPhoneNumber],
Playerinfo[playerid][pUV],
Playerinfo[playerid][pBankPin],
Playerinfo[playerid][pIsOnHospital],
GetEscName(playerid));
mysql_query(Query);
format(Query, sizeof(Query), "UPDATE account SET `Jobs` = '%d' WHERE `Name` = '%s'",
Playerinfo[playerid][pJob],
GetEscName(playerid));
mysql_query(Query);
return 1;
}
Re: mysql dosent save(:() -
Konstantinos - 26.01.2014
After executing a query, print it to debug it:
pawn Код:
mysql_query(Query);
print(Query);
Did Query store the whole message or not? Also check the mysql logs.
Re: mysql dosent save(:() -
romka - 26.01.2014
where is the mysql log?
Re: mysql dosent save(:() -
Konstantinos - 26.01.2014
There should be a file mysql_log.txt if
mysql_debug is enabled (according to your plugin's version).
Re: mysql dosent save(:() -
romka - 26.01.2014
no there isent mysql-log.tx
Re: mysql dosent save(:() -
romka - 26.01.2014
help please!
Re: mysql dosent save(:() -
romka - 26.01.2014
PHP код:
[18:19:21] UPDATE kasutajad SET `AdminLevel` = '0', `Money` = '500', `HP` = '100.000000', `Armor` = '0.000000', `Skin` = '7', `RPTest` = '0', `Kate1` = '0', `Kate2` = '0', `Kate3` = '0', `PosX` = '1845.755981', `PosY` = '-1843.883178', `PosZ` = '17.078037', `Fraction` = '0', `FractionRank` = '0', `Hospital` = '0', `Age` = '19', `Bank` = '5000', `Phone` = '0', `PhoneNumber` = '0', `UV` = '0', `BankPin` = '0', `IsOnHospital` = '0' WHERE `Name` = 'Roland_Nevilleaaaa'
[18:19:21] UPDATE kasutajad SET `TooID` = '0' WHERE `Nimi` = 'Roland_Nevilleaaaa'
This Works Put this dosent set it to mysql :S,i taked it from server log.
Re: mysql dosent save(:() -
Konstantinos - 26.01.2014
Execute those two queries through phpMyAdmin, if there's anything wrong with the field's name or something else it will most likely inform you.
Re: mysql dosent save(:() -
romka - 26.01.2014
PHP код:
--
-- Table structure for table `account`
--
CREATE TABLE IF NOT EXISTS `account` (
`RegID` int(10) NOT NULL auto_increment,
`Name` varchar(24) NOT NULL,
`Password` varchar(129) NOT NULL,
`Money` int(15) NOT NULL default '500',
`PosX` float NOT NULL default '1642.23',
`PosY` float NOT NULL default '-2240.5',
`PosZ` float NOT NULL default '13.4952',
`Bank` int(15) NOT NULL default '5000',
`AdminLevel` int(1) NOT NULL default '0',
`HP` float NOT NULL default '100',
`Armor` float NOT NULL default '0',
`Skin` int(11) NOT NULL default '1',
`RPTest` int(11) NOT NULL default '0',
`Kate1` int(11) NOT NULL default '0',
`Kate2` int(11) NOT NULL default '0',
`Kate3` int(11) NOT NULL default '0',
`Sex` int(11) NOT NULL default '0',
`Fraction` int(11) NOT NULL default '0',
`FractionRank` int(11) NOT NULL default '0',
`Hospital` int(11) NOT NULL default '0',
`Age` int(11) NOT NULL default '0',
`Phone` int(11) NOT NULL default '0',
`PhoneNumber` int(11) NOT NULL default '0',
`UV` int(11) NOT NULL default '0',
`IsOnHospital` int(11) NOT NULL default '0',
`BankPin` int(11) NOT NULL default '0',
`Job` int(11) NOT NULL default 'Tццtu',
PRIMARY KEY (`RegID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=294 ;
-- --------------------------------------------------------
Re: mysql dosent save(:() -
romka - 26.01.2014
help please!