mysql don't give the variable in game -
OuDayas - 10.02.2019
Hi, I've write a simple GM in mysql, with a symple registration and login system for RP server...
The problem is... when the player go to the server and finish the registration, the script set the player position in a default point, with a random skin for the selected gender, but... when the player exit from the server and try to enter again, the script didn't set the saved skin id, but set a random id called "741355568", how can i fix that? because if I change in game the skin and re-enter in the server I have the same problem.
This is the
script where i have this problem
Re: mysql don't give the variable in game -
Mugala - 10.02.2019
I think that problem is here.
PHP код:
cache_get_value_int(0, "skingiocatore", Player[playerid][SkinPlayer]);
new skinid = Player[playerid][SkinPlayer];
SetPlayerSkin(playerid, skinid);
I don't know what MySQL version u're using but in most cases, u must use cache_get_value_int like that way: skinid = cache_get_value_int(numrow,"sql");
so the right code must be like this.
PHP код:
Player[playerid][SkinPlayer] = cache_get_value_int(0, "skingiocatore");
SetPlayerSkin(playerid, Player[playerid][SkinPlayer]);
and also, make sure that you have a right skin saved in your SQL base.
Re: mysql don't give the variable in game -
OuDayas - 10.02.2019
Mine is v41-4.
and if I try the method tha tu told me, i have this error:
error 017: undefined symbol "cache_get_value_int_ovrld"
Quote:
Originally Posted by Mugala
I think that problem is here.
PHP код:
cache_get_value_int(0, "skingiocatore", Player[playerid][SkinPlayer]);
new skinid = Player[playerid][SkinPlayer];
SetPlayerSkin(playerid, skinid);
I don't know what MySQL version u're using but in most cases, u must use cache_get_value_int like that way: skinid = cache_get_value_int(numrow,"sql");
so the right code must be like this.
PHP код:
Player[playerid][SkinPlayer] = cache_get_value_int(0, "skingiocatore");
SetPlayerSkin(playerid, Player[playerid][SkinPlayer]);
and also, make sure that you have a right skin saved in your SQL base.
|
Re: mysql don't give the variable in game -
Mugala - 10.02.2019
what is "cache_get_value_int_ovrld" ? it's not correct.
Re: mysql don't give the variable in game -
OuDayas - 10.02.2019
I don't know, I didn't used that code, I used the code that u gived to me... maybe is literally a bugged script? because i take a MySQL base from MySQL developer... here
link
Quote:
Originally Posted by Mugala
what is "cache_get_value_int_ovrld" ? it's not correct.
|
Re: mysql don't give the variable in game -
ComDuck - 11.02.2019
I'm looking at your UpdatePlayerData function, how are you sending the query? You commented out literally every SQL query code in there.
Re: mysql don't give the variable in game -
OuDayas - 11.02.2019
Quote:
Originally Posted by ComDuck
I'm looking at your UpdatePlayerData function, how are you sending the query? You commented out literally every SQL query code in there.
|
It's because i have tested more codes
Re: mysql don't give the variable in game -
ComDuck - 11.02.2019
Quote:
Originally Posted by OuDayas
It's because i have tested more codes
|
Which query code is the one that you are using in your production server?