Was Void taken out?
Monkey Forums/Monkey Programming/Was Void taken out?
| ||
Method OnCreate:Void() End Method How come I can't use Void with the above? |
| ||
You can't because the base method has :Int() as return value. You can't override it with a different return value. |
| ||
OnCreate(), OnUpdate(), and OnRender() all return Int, presumably for debug/error checking purposes. Like Xaron said, when extending/overriding these, you have to also return Int. In strict mode, this also means there must be a Return value. (I recommend Return 0 as this is what would happen without Strict. If you hit an error you want to return early from, you can return a negative number...) |