When I compile my mod I get the following error:
unknown function: hscounter
This is what my "hscounter" looks like:
Now as u can see this is not supposed to be a function at all, merely just a counter. And this is the only function where I use "hscounter" + one other function where I just use self.hscounter destroy().
Also I heard from a friend of mine that he had similar problems with counters, so is this some kind of a common problem or is there something I should know about?
I already tried things like declaring the hscounter in init(). Because I thought that the error meant that, when my function is tryin to destroy the hscounter, it doesn't really exist yet.
But that didn't work, so yeah, any help is appreciated!
unknown function: hscounter
This is what my "hscounter" looks like:
PHP Code:
headshotMadness()
{
self endon("disconnect");
self endon("death");
self endon("stop_hs_madness");
self.startHeadshots = self.headshots;
self iPrintLnBold("^2Headshot madness for 20 seconds starts NOW!");
while(1)
{
self.hscounter destroy();
self.hscounter = createFontString( "default", 1.5 );
self.hscounter setPoint( "center", "center", 0, 0 );
countheadshots = self.headshots - startHeadshots;
self.hscounter setText("^1Headshots: ^7"+ countheadshots);
self waittill("hs_madness_update");
}
}
Now as u can see this is not supposed to be a function at all, merely just a counter. And this is the only function where I use "hscounter" + one other function where I just use self.hscounter destroy().
Also I heard from a friend of mine that he had similar problems with counters, so is this some kind of a common problem or is there something I should know about?
I already tried things like declaring the hscounter in init(). Because I thought that the error meant that, when my function is tryin to destroy the hscounter, it doesn't really exist yet.
But that didn't work, so yeah, any help is appreciated!