Function getting stack overflow error and I don't know why.
-
Thanks Dave, sadly it's still giving me the error. weird huh?
Maybe I'll just take the code out of the function and stick it in the main loop and see if it still does it.Hells bells.. I even get the error when the code is in the main loop and not in a function.
(I find it more than a little strange that its giving me 'too many functions called' when my code is now not calling any functions at all.) -
Try changing it so that (in pseudo-code)
increment = 0 if c.a then increment = 3 if c.b then increment = -3 setspriterotation(sprite, r + increment)
That way the setspriterotation is not called within a conditional block
-
It seems this is a rare bug in Fuze. I've even tried commenting out each part and testing it (ie the rotate part, then move, then draw) but it crashes every time regardless.
so it's a case of wait for the next patch. Thanks anyway everyone! -
Could some kind and possibly bored person type in the example code at the bottom of this page.
https://fuzearena.com/help/view/getSpriteSpeedI tried to use that instead of my code and I'm still getting stack overflow and now I'm beginning to suspect an issue with my Switch itself.
-
@SteveZX81 There is no need to type it. You can copy it from the help page and then paste it into your code. I have just done this and I'm afraid it is working for me
-
It does work but did you leave it running for like 30 secs? if you did then I guess I do have a switch problem. Thanks anyway
-
@SteveZX81 I will try that now
-
@SteveZX81 Seems OK to me. I assume that you have the patch installed? Have you tried it after a restart of Fuze?
-
Yes and yes. I even did a hard reset earlier. Thanks anyway. I think we've found the problem.
-
Steve. Please let me try this later also as I still fail to see how this can be a problem with your Switch. Given we’re seeing the same issues elsewhere I’m really curious now!
-
Same prolem with my game, i think i will just wait for the patch since it will mean apply too mutch changes to the code