problems

Monkey Forums/Monkey Beginners/problems

Rollie(Posted 2014) [#1]
Hi There
if i make a basic print "hello world", it only gets shown halfway down the page
2. This doesnt show anything! :

Import mojo
Class Mygame Extends App
Method OnRender()
SetColor 111,1,44
DrawCircle 1,1,55
End
End
Function Main()
New Mygame()
End


degac(Posted 2014) [#2]
I'm on smartphone but I'm sure you missed to setup onCreate method.
Check the examples to see how a program is structured.


therevills(Posted 2014) [#3]
Works fine here on HTML5... what version of MonkeyX are you using?


ziggy(Posted 2014) [#4]
On older Monkey X versions, you need to set the update rate on OnCreate.

Import mojo
Class Mygame Extends App
    Method OnCreate()
        SetUpdateRate(60);
    End
    Method OnRender()
        SetColor 111,1,44
        DrawCircle 1,1,55
    End
End
Function Main()
    New Mygame()
End



Rollie(Posted 2014) [#5]
the 2nd example displays when i switch context back to MonkeyX IDE


Rollie(Posted 2014) [#6]
thanks ziggy, it works!
BUT i downloaded latest version M-X today?


ziggy(Posted 2014) [#7]
Where from? Was it the free version? The free version is always a bit older than the commercial one.


Rollie(Posted 2014) [#8]
Free version..