Vars changing without being assigned
#1

I have a frustrating issue that needs to be resolved. One variable in my pInfo enum is changing without being assigned. I posted a couple months ago about this issue and Calg00n suggested using pVars, but even using pVars this happens. OnPlayerConnect, the slot is set to -1 in the enum and also the pVar. Somewhere between connecting and saving, even if done right after each other, they BOTH change to 48. The script is SQL based using gStylezz's plugin. Any help on this matter would be greatly appreciated. I would be willing to send you parts of the script if you need to see it. Thanks in advance.
Reply
#2

I actually had a very similar issue, i solved it by doing:
pawn Код:
new string[20];
    format(string, sizeof(string), "playerid: %d", playerid); //for some strange reason it was setting the playerid to 103 EVERYTIME, by this line ... it was fixing the problem.

// rest of code
....

    return 1;
}
Reply
#3

It's an integer, so I can't use format for it but I'll try something similar.
Reply
#4

i'm also looking to why variables randomly change sometimes, if you fix this, can you please pm me how it was fixed.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)