Hi,
As the title suggests i am having issues with scheduleing a selector to be called. Currently i have a NSObject for my HUD that has a CCLayer called headsupdisplay. The headsupdisplay layer has a ccmenu with a button that when clicked i want to call a method that adds a unit to the screen and schedules a method to be called at a regular interval to update cooldown timers on the units (und update their graphics accordingly). My problem is that when i schedule a call using the following code
[self.headsUpDisplay schedule:@selector(decrease:)]
end up with the following error
`*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Signature not found for selector - does it have the following form? -(void) name: (ccTime) dt'
My method i am trying to call is as follows
- (void)decrease:(ccTime)dt
I have also tried[self scheduleUpdate]; (after changing my method name to update) but still had no luck.
All solutions i found while searching involved people who had left a colon out somewhere or they recreated their project and it fixed the error (which seams a bit extreme). if i move the same code to my helloworldlayer and remove the headsupdisplay part of the schedual so that it is just
[self schedule:@selector(decrease:)];
it works fine.
Can i schedule selectors on a child of self? (dont see any reason why not)
This is doing my head in so any help you can provide is greatly appreciated.
Thanks
Darc
PS. Sorry about the formatting, i put all the code in back ticks but it doesn't appear to be working.