Strange warning
#1

I am trying to set a timer on a global variable ..

Код:
new AutoTimer;

public OnFilterScriptInit()
{
	AutoTimer = SetTimer("SwitchMode", 120000, 0);
	return 1;
}
Except when it compiles it gives me a warning that AutoTimer is never used. Except it is .. how do I solve this?
Reply
#2

And where do you use it ?
Reply
#3

Reply
#4

You just transformed an integer into a function
Reply
#5

It will make the warning go though.. Which is what were asked
There are other ways but thats the first thing i thought off,
Reply
#6

Reply
#7

No lol .. the AutoTimer = global variable which I then use to start the timer .. like

AutoTimer = SetTimer("SwitchMode", 120000, 0);

The SwitchMode is the function it runs. It's global because I need to KillTimer also.

Thanks for your help though, seems that once I put the variable into the KillTimer function it compiled fine
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)