Found the answer at this thread (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=23133.0), but it was titled "how to do "blah.blah" functions", which wasn't very descriptive.
~Trent
---------------------------
Adventure Game Studio
---------------------------
Script link failed: Runtime error: unresolved import 'MyStruct::Add^2'
---------------------------
OK
---------------------------
I'm currently trying to organize my code, so I decided to write a module to contain my variables and functions. I get the error above when I try to run my game (no compile errors) and I have no idea what to do. My code:
//module header
//enum StatEnum is declared here.
struct MyStruct {
import function Add(StatEnum param, int toAdd);
};
//..later on
MyStruct Stat;
//module script
function Add (StatEnum param, int toAdd) {
if (param == eStr) { Stat_Strength += toAdd; }
else if (param == eInt) { Stat_Intelligence += toAdd; }
else if (param == eAgi) { Stat_Agility += toAdd; }
//etc
}
I read the AGSwiki Module programming guidelines (http://www.americangirlscouts.org/agswiki/Module_programming_guidelines) a little bit, but most of it is if you're publishing a module. Basically I just want to be able to access Stat.Add and other functions (and other structs).
~Trent
Just for reference, it's supposed to say
function MyStruct::Add(...)
Quote from: KhrisMUC on Thu 13/11/2008 00:41:01
Just for reference, it's supposed to say
function MyStruct::Add(...)
Yeah, that's what I figured out. Now on to the next problem.
~Trent