include (once again)
Monkey Forums/Monkey Programming/include (once again)
| ||
Hi Has an include been included yet in Monkey? (excuse the terrible pun) I know its classed as very dirty coding, but I have a game engine and a list of consts that control it. I would like to keep these consts in a seperate file so that I can upgrade the engine without affecting versioning on the game (if that makes sense) |
| ||
You can do this with import. No need include for this. Just import the consts in your engine main file and they'll be available in any pogram importing or using your engine. |
| ||
really? that easy? why haven't I tried this before? |
| ||
Imports "spread" if you import a file, you'll be also importing any files imported by that file. the only limitation is that, if an import is inside a "Private" area, the imports of this area are not populated. Otherwise, yes. It's this easy. |
| ||
well that was easy! many thanks |