Local variable not saving
#1

hey guys, so heres the deal. im in the middle of finishing up my /want system
the command works fine and so does the database saving, but the actual variable inside the script isnt saving to its assigned value. for example, in the code below it sets the value to 5, and when it checks if the value is 5 it returns nothing here are my enums cheers.
Код:
enum pdata
{
    WantedLevel
}
new PlayerData[MAX_PLAYERS][pdata];
Код:
CMD:test(playerid, params[])
{
    PlayerData[playerid][WantedLevel] = 5;
    return 1;
}
CMD:check(playerid, params[])
{
    if(PlayerData[playerid][WantedLevel] == 5) return SCM(playerid, red, "Good");
    return 1;
}
Reply


Messages In This Thread
Local variable not saving - by romas3110 - 13.04.2015, 04:06
Re: Local variable not saving - by SequenceCuz - 13.04.2015, 06:46
Re: Local variable not saving - by romas3110 - 13.04.2015, 07:57
Re: Local variable not saving - by NoDi522 - 13.04.2015, 16:03
Re: Local variable not saving - by Azula - 13.04.2015, 16:06
Re : Local variable not saving - by Dutheil - 13.04.2015, 16:22

Forum Jump:


Users browsing this thread: 3 Guest(s)