Type 'App' not found
Monkey Forums/Monkey Programming/Type 'App' not found
| ||
Hello~ Sorry~ little english my code is ---------------------------------------------- Import mojo Class MyApp Extends App End Function Main() New MyApp End ---------------------------------------------- very simple code but... click click 'Biuld/Run' icon 'Type 'App' not found'!! modules directory incorrect path was not include monkey sample code has good running why not Import mojo? help me~~~~ T.T monkey version 70g os = windows7 |
| ||
I think the minimum for an app is this:Strict Import mojo Class Game Extends App Method OnCreate%() SetUpdateRate 15 Return 0 End Method OnUpdate%() If KeyHit(KEY_ESCAPE) Then Error "" Return 0 End Method OnRender%() Cls Return 0 End End Function Main%() New Game Return 0 End And keep in mind, that functions need to return a value! |
| ||
Functions only need return values in Strict mode. And no, his example works for me, even though I had the same thought that some methods have to be added... Hmm... |
| ||
MIDIMASTER- And keep in mind, that functions need to return a value! Xaron- Functions only need return values in Strict mode. --------------- Advice, thank you Issue has been resolved It was a problem with the file name was 'mojo.monkey'.... I am ashamed~~~~~~~ And I am studying the smalltime outlaws's video. |
| ||
No need to feel ashamed. Good luck! |
| ||
Nobuyuki- Thank you a ri ga to u!~ |
| ||
Mistakes are not bad it's how we learn :) |