Need help with mysql... (Learning mysql)
#1

I'm new here and I'm trying to learn mysql so..
I have one big problem here is the line where is error.

Код:
error 017: undefined symbol "Logged" 

if(!Logged[playerid]) 

or all code :

	if(Logged[playerid] == 1)//this place..
    {
        //If the player disconnects before registering,
        //we want to make sure it doesn't try update
        //so we check if the player is logged in.
        new score = GetPlayerScore(playerid); //Gets players score
        new money = GetPlayerMoney(playerid); //Gets players money
        new query[200], pname[24]; //Creates the variables
        GetPlayerName(playerid, pname, 24); //Gets the players name.
        format(query, sizeof(query), "UPDATE playerdata SET score=%d, money=%d WHERE user='%s'", score, money, pname);
        mysql_query(query);
        //No need to store a result for a update string
    }
Thank you for your help.
Reply
#2

Quote:
Originally Posted by Request
Посмотреть сообщение
I'm new here and I'm trying to learn mysql so..
I have one big problem here is the line where is error.

Код:
error 017: undefined symbol "Logged" 

if(!Logged[playerid]) 

or all code :

	if(Logged[playerid] == 1)//this place..
    {
        //If the player disconnects before registering,
        //we want to make sure it doesn't try update
        //so we check if the player is logged in.
        new score = GetPlayerScore(playerid); //Gets players score
        new money = GetPlayerMoney(playerid); //Gets players money
        new query[200], pname[24]; //Creates the variables
        GetPlayerName(playerid, pname, 24); //Gets the players name.
        format(query, sizeof(query), "UPDATE playerdata SET score=%d, money=%d WHERE user='%s'", score, money, pname);
        mysql_query(query);
        //No need to store a result for a update string
    }
Thank you for your help.
add this at top

new Logged[MAX_PLAYERS];
Reply
#3

Thanks mate All working now
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)