Can't run very basic code - bbgamedelegate?
Monkey Forums/Monkey Programming/Can't run very basic code - bbgamedelegate?
| ||
I'm trying to run a very basic mojo app- here in its entirety...Import mojo.app Import mojo.graphics Class Game Extends App Method OnRender() DrawText "Hello World!",0,0 'hello End End Function Main() New Game End Monkey falls over in mojo.app complaining "app.monkey<30> : Error : Type 'BBGameDelegate' not found" Any ideas? |
| ||
Never mind- I had C++ tool as target. |
| ||
First delete the build folder of this project.... Then add some minimum requirements. I would suggest to always start form this minimum code: Strict Import mojo Class Game Extends App Method OnCreate%() SetUpdateRate 60 Return 0 End Method OnUpdate%() If KeyHit(KEY_ESCAPE) Then Error "" Return 0 End Method OnRender%() DrawText "Hello World!",0,0 Return 0 End End Function Main%() New Game Return 0 End Strict! Return Values! And SetUpdateRate()!!! There is no OnRender() without a valid UpdateRate... |
| ||
Thanks, Midi. The code I posted was pretty verbatim from Monkey documentation, but you're right, it's missing a few basic bits. |