Another question bout importing variables

Started by Theme, Thu 20/10/2005 00:22:18

Previous topic - Next topic

Theme

I'm trying to import a variable declared in the global script to a module
but im getting error  >:(

Code: ags
// Script header for module 'WalkToInteraction'
		import int chargoing;


Code: ags
// main global script file
int chargoing = 0;

export chargoing;


o/

strazer

You can't do that. Modules are loaded before the global script so in modules, you can only import stuff from preceding modules.

What you could do is define and export the variable in the module, then import it in the global script header.
Did you know that you can use rep_ex, on_mouse_click etc. in modules as well?

Theme


SMF spam blocked by CleanTalk