mysql don't give the variable in game
#1

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
Reply
#2

I think that problem is here.
PHP код:
                cache_get_value_int(0"skingiocatore"Player[playerid][SkinPlayer]);
                new 
skinid Player[playerid][SkinPlayer];
                
SetPlayerSkin(playeridskinid); 
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(playeridPlayer[playerid][SkinPlayer]); 
and also, make sure that you have a right skin saved in your SQL base.
Reply
#3

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(playeridskinid); 
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(playeridPlayer[playerid][SkinPlayer]); 
and also, make sure that you have a right skin saved in your SQL base.
Reply
#4

what is "cache_get_value_int_ovrld" ? it's not correct.
Reply
#5

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.
Reply
#6

I'm looking at your UpdatePlayerData function, how are you sending the query? You commented out literally every SQL query code in there.
Reply
#7

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
Reply
#8

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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)