Global Variables
#1

Hello !

A global variable doesn't work properly after few time or few players connected on my server. For example, i have RadioListeners, TaxiDriver , PaintballPlayers.
When i open the /radio menu and play one of them i am using RadioListeners += 1.
When a TaxiDriver is on duty, i am using TaxiDrivers += 1 and also when i am playing paintball PaintballPlayers is += 1.
After few time / or players connected it is stuck. On /radio menu doesn't appear the number of listeners, /service taxi doesn't work because "there are no taxi drivers on duty" and PaintballSystem doesn't start. This problem is for all the variables which count something. Sorry for my english. Thanks a lot

Why?Any ideas?
Reply
#2

Can you show me the functions ( variables ) you're using? I'll happily look into them.
Reply
#3

So i am using them in the entire GM. For example HERE :

On radio:

Код HTML:
new countr1 = 0;
	            new countr2 = 0;
	            new countr3 = 0;
	            new countr4 = 0;
	            new countr5 = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
				{
		            if(RadioID[i] == 1)
					{
						countr1++;
					}
					if(RadioID[i] == 2)
					{
						countr2++;
					}
					if(RadioID[i] == 3)
					{
						countr3++;
					}
					if(RadioID[i] == 4)
					{
						countr4++;
					}
					if(RadioID[i] == 5)
					{
						countr5++;
					}
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)