10.01.2016, 18:40
Cmon ppl, how is the problem in GetName ?!!! Dem random posts ..
First line tells us inserting was successful, therefore your insert query only needs 2 values to be a successful insert, therefore other columns all have defaults or just doesn't exist.
Here's the part, after you make a player's mysql row, you shouldn't use insert, but you should use UPDATE to update his gender and country (if those columns exist in your database, if not create them first and give them a default value).
Here's another problem, whenever you are passing a string to MYSQL, you should use ' ' (and also better to use %e with mysql_format to escape the strings)
Correct code would be
%d is for integers, %f is for floats
Oh and this suggests you missed some of variables, making username missing.
^^And I'm not sure if this is gonna work
These are so far only problems I could see, fix these and update the thread with your updated code and we'll see if any more is wrong with it.
PHP код:
[14:15:44] ProcessQueryThread(DefaultCallback) - Query was successful. (INSERT INTO `Accounts` (`Username`,`pPass`) VALUES ('testing_test','‹'))
[14:15:46] Passing query [U]INSERT[/U] INTO `Accounts` (`Gender`) VALUES(``) WHERE `Username` = 'testing_test' |
[14:15:46] CMySQLHandler::ProcessQueryThread() - Error will be triggered to OnQueryError()
[14:15:46] OnQueryError() - Called.
Here's the part, after you make a player's mysql row, you shouldn't use insert, but you should use UPDATE to update his gender and country (if those columns exist in your database, if not create them first and give them a default value).
PHP код:
`pRankName` = %s
Correct code would be
PHP код:
`pRankName` = '%s'
PHP код:
`XPos` = %d, `ZPos` = %d, `YPos` = %d
PHP код:
WHERE `Username` = ''
PHP код:
PlayerInfo[playerid][RentingVehicle] = 0
These are so far only problems I could see, fix these and update the thread with your updated code and we'll see if any more is wrong with it.