Random vValue
#1

Hi there !

Some variables do not work properly but i don't know why. For example I have it:

new bag = 0;

When it is spawned i have bag = 1;

I am using if(bag == 0) to spawn a bag just if it is not spawned already.
After some time it is stuck. The variables remain on 0.

Another example:
I use TheRadio[MAX_PLAYERS] = 0; When a player is listening a radio station this variable gets a value 1,2,3,4,5 etc ( radio id ). I am using it to count how many listeners are for each radio station. After some time the variable remain on 0 ( i think ) because it doesn't count right.

Another example:
I have On‌Event = 0; When a player use /join to participate, I use OnEvent += 1; When I see how many players participate there is a wrong value. Sometime 89,28,38 even if is just 5-10 players. ( I use On‌Event = 0; on stopevent to reset i.)

Another:
A player gets a job and pJob] = 1,2,3,4,5... After spawning or entering in a vehicle the job disappear. I don't use pJob] = 0; anywhere.It is weird.


Some reasons for the variable problem?
Reply
#2

We'll have to see the code related to these issues. Guessing the problems with nothing to go on is kind of impossible.
Reply
#3

Quote:
Originally Posted by Infinity
Посмотреть сообщение
We'll have to see the code related to these issues. Guessing the problems with nothing to go on is kind of impossible.
It means to give you my entire gamemode. I am pretty sure that the problem is not appearing there. It is a global problem to all variables.
For example to event system i reset the variables to 0 when i create a event or when it is stopped. It has to count correct to next event but it doesn't.
Reply
#4

If it is not the gamemode, then what do you think it is? Cosmic rays?
Without code, we won't be able to help.
Reply
#5

Quote:
Originally Posted by Infinity
Посмотреть сообщение
If it is not the gamemode, then what do you think it is? Cosmic rays?
Without code, we won't be able to help.
So do you want to give the entire gamemode? The problem persist to all the variables on 60k lines. I asked you if you have any idea about it, I thought that some members know this problem and any solution like a plugin VariableFixer or something.

For example, do you know any cause why the job disappear? I searched for pJob] = 0; or pJob] = false; on it and i did not found anything. Why it is reset to 0 alone?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)