I have a function in GlobalScript.asc which goes:
function unitUPG(String Type, bool UPGable){
Then I have a function in GlobalScript.ash which goes:
import function UnitUPG(String, bool);
But when I try to run the game, a message box (!) comes up and tells me:
"Unable to create local script: Runtime error: unresolved import 'Unit UPG' "
I am calling UnitUPG from other rooms, but I doubt that makes a difference
How can I fix this?
Thanks
Look up Modules in the manual.
You need the import to be like this:
import function unitUPG(String Type, bool UPGable);
Which is odd because Import in the manual states otherwise.
The manual is a bit two sided on that one...
Unfortunately, I tried this but it still comes up with the same error. Are there any other causes for the message box?
Thanks
Look carefully at the names... make sure the capitalization is the same! :=
To spell it out, you have unitUPG and UnitUPG.
Nope, still doesn't work.
Would it be helpful to note that in brackets the window says:
"ACI version 3.12.1074" ?
Thanks
Once you have matched up the function names, make sure the rooms are recompiled.
...
I
Am
So
Sorry
About
This
Post :(
unitUPG, NOT UnitUPG (capitol "U")
sorry guys, that was quite the mistake I just made ;D
Forgive me (please!) :=
But thanks for all the help!
Lol it happens ;D Usually it's a sign you either need some sleep, or more caffeine ;)
I always copy-paste the declaration that needs to be imported. "import " Ctrl-V ";" done.