Calling a function from a module underneath it.

Started by Phemar, Tue 07/05/2013 08:31:26

Previous topic - Next topic

Phemar

So I've written quite a few modules for my current project. Right now my problem lies with three of them - I have a custom dialog system module and a non-blocking script command module.

They're ordered like this:

- Dialog Module (essence of the code)
- Non-blocking module
- Dialog scripts module (the scripts for each dialog)

The non-blocking module needs to call the dialog.Run command from the dialog module and the dialog script module needs to call the non-blocking functions from the non-blocking module.

This worked fine until today I realized I also need to call the RunDialogOption command in the dialog scripts module from the dialog module.

Is there anyway to call a function from a module that's below?

Crimson Wizard

Quote from: Phemar on Tue 07/05/2013 08:31:26
Is there anyway to call a function from a module that's below?

No.
This is one of the banes of ags script.
You will have to reorganize your functions or program logic somehow.

Phemar

Damn. Well there are ways around my problem - workarounds if you will. It's just gonna lead to a lot of repeated code and will be somewhat inefficient. Oh well, thanks for the quick reply!

SMF spam blocked by CleanTalk