Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
I'm trying to use the ?: operator in my game, but it causes an error on startup. The temp.exe file crashes causing the Windows error reporting service to trigger. This happens in XP and Vista.
Here the expression as I'm using it in the code.
PlayerDeck.Value('num_cards')<0 ? 52 : 0[/code:397z7hxl] It's in an action that attempts to increment the value of PlayerDeck.Value('num_cards') by either 52 or 0 Am I using the expression correctly?
I think it's a bit buggy. You might want to throw brackets around every operand:
(PlayerDeck.Value('num_cards') < 0) ? (52) : (0)
If that doesn't help, it's probably totally broken, so ditch it and use subevents instead.
I tried brackets everywhere and even took out the spaces:
((PlayerDeck.Value('num_cards'))<0)?(52):(0)[/code:2q11itv5] It still gave the same error so I guess I'll have to go with the subevents. Thanks
I added the bug to the tracker, so hopefully it'll be fixed soon.
Develop games in your browser. Powerful, performant & highly capable.
ooh, thanks. I still haven't even gone through and learned how to submit a bug report.
You people are too nice.