(stupid) question
Monkey Forums/Monkey Programming/(stupid) question
| ||
How come I'm getting a syntax error for the following?: Include "menugui.monkey" Does monkey include source files differently than Bmax? |
| ||
There's no "Include" -- try "Import". |
| ||
Import seems to not work as well. it highlights this line: playButton = New nButton(fredimg,200,200,"Play") saying that it can't find the class "nButton" Here is menu.monkey: |
| ||
Hi, Try 'Import menu' - no quotes or .monkey extension. |
| ||
That worked; however I had to import mojo on the included source aswell, even though the main mojo import was above the source import. Is this a bug or was it intended? |
| ||
Import scopes are "by file" But Monkey does process properly cyclic imports, so usually, you can place all module imports in your main file, and add an Import main (or whatever name has your main file) in all imported files. Doing so, you get the same results as when using Include in BlitzMax, but in a cleaner way. |
| ||
Nice tip ziggy had not noticed that yet. |
| ||
Thanks ziggy! Here's a new question to add to the (stupid) questions list. How does the game's resolution port across devices? I know that the standard monkey screen is 640x480.. and this is great for flash/html 5, but how does that look on say.. android? How should I make my graphics accordingly, so that it works across any iphone/android? |
| ||
Have a look at the auto-fit example in bananas\hitoro\autofit... |
| ||
Interesting. It compiles correctly on HTML5, but with flash I'm getting a blue screen and a bunch of errors. Any ideas? |
| ||
Have you set your security settings in flash for the directories your working on? |
| ||
Yeah. It compiles fine to flash when I don't use the virtual resolution stuff. And the virtual resolution stuff compiles to HTML5 just fine, but when I try to compile to flash using the virtual resolution stuff, it breaks. |
| ||
Any word on this? It seems broken in Android too. |
| ||
Hi Yahfree... Ive just tested the auto-fit example in HTML5, GLFW, Flash and Android - they all work fine here. What errors are you getting? |