Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 9    Views: 71

MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
10/26/15 04:06 AM (8 years ago)

SKSprinteNode Error

Hi, getting a Incompatible block pointer types sending 'void (^)(SKSpriteNode *__strong, NSUInteger, BOOL *)' to parameter of type 'void (^ _Nonnull)(SKNode * _Nonnull __strong, NSUInteger, BOOL * _Nonnull)' Anyone know how to work around it? Tried changing SKSprinteNode to SKNode, as some suggest, but I then get a bunch of new errors. Thanks
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
10/28/15 12:35 PM (8 years ago)
Found a way around it. After changing to SKNode a had an erro that size was not recognised in the object, it had to me frame.size. Cheers.
 
Alex@TM
Apple Fan
Profile
Posts: 956
Reg: Dec 20, 2011
London, UK
10,560
like
11/18/15 04:53 PM (8 years ago)
@Madrod...you could be my saviour!!! Could you explain further please!!! I'll owe you, thanks! This is the code snippet i'm having issues with.. Many thanks!! - (void) update:(NSTimeInterval)currentTime { [self.children enumerateObjectsUsingBlock:^(SKSpriteNode * child, NSUInteger idx, BOOL *stop) { child.position = CGPointMake(child.position.x-self.scrollingSpeed, child.position.y); if (child.position.x <= -child.size.width){ float delta = child.position.x+child.size.width; child.position = CGPointMake(child.size.width*(self.children.count-1)+delta, child.position.y); } }]; }
 
Alex@TM
Apple Fan
Profile
Posts: 956
Reg: Dec 20, 2011
London, UK
10,560
like
11/18/15 06:04 PM (8 years ago)
@madrod, I've added the fix, which kind of works. Have you noticed that not all scores are counted?
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
11/19/15 09:21 AM (8 years ago)
Hi, I noticed that the second is never counted. Have you noticed more scores?
 
Alex@TM
Apple Fan
Profile
Posts: 956
Reg: Dec 20, 2011
London, UK
10,560
like
11/19/15 09:54 AM (8 years ago)
This is the same issue i have @madrod. Have you found a fix or have any idea what is going on here?!
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
11/19/15 10:01 AM (8 years ago)
No, but I can tell you that the missing scores have been here since the plugin's release. I used when the plugin first came out and noticed that then. It doesn't seem related to the SKNode issue. haven't found away around it.
 
Alex@TM
Apple Fan
Profile
Posts: 956
Reg: Dec 20, 2011
London, UK
10,560
like
11/19/15 10:03 AM (8 years ago)
Thats weird, i have built a few games and never had that issue before.
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
11/19/15 10:05 AM (8 years ago)
I just checked and have it on an old game.... hummm There are 2 angry bird plugin have you always used the same one?
 
Alex@TM
Apple Fan
Profile
Posts: 956
Reg: Dec 20, 2011
London, UK
10,560
like
11/19/15 10:12 AM (8 years ago)
Thats weird, i have built a few games and never had that issue before.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.