Sunday, July 26, 2015

Monkey-X - Error command example

Here a example of how to stop the Monkey program and show a notify window that can show  some information if needed.

Import mojo

Class MyGame Extends App
    Method OnCreate()
    End Method
    Method OnUpdate()
        Error "Program stopped here...."
    End Method
    Method OnRender()
        Cls 0,0,0 
        SetColor 255,255,255
        DrawText "Error Message example.",0,0
    End Method
End Class

Function Main()
    New MyGame()
End Function

No comments:

Post a Comment