Im building this using the nss compiler on linux.
(Think its the advanced compiler)
struct Power
{
string PowerName;
int FeatID; //-1 for no feat
int IsPassive; //1 for yes, 0 for no: Determines if the Heartbeat will apply effect or not
int EffectType; // Used for Passives
int TimeOfDayActive; //Used to determine when ability is active or usable (TIME_BOTH for always);
int EffectNumber1;
int EffectNumber2;
int LevelOfPower;
int VisualEffect; //If there is an associated visual (auras etc)
};
struct Genome
{
string GenomeID;
string Description;
struct Power Level1Effect;
struct Power Level2Effect;
struct Power Level3Effect;
struct Power Level4Effect;
struct Power Level5Effect;
struct Power Level6Effect;
struct Power Level7Effect;
struct Power Level8Effect;
struct Power Level9Effect;
struct Power Level10Effect;
};
void CreateGenome(struct InhumanGenome genome){
int i = GetGenomeCount();
i++;
object oMod = GetModule();
string GenomeID = genome.GenomeID;
SetLocalInt(oMod,GENOME_NAME_TO_ID+"_"+GenomeID,i);
SetLocalString(oMod,GENOME_ID_TO_NAME+"_"+IntToString(i),GenomeID);
SetGenomePower(i, genome.Level1Effect);
SetGenomePower(i, genome.Level2Effect);
SetGenomePower(i, genome.Level3Effect);
SetGenomePower(i, genome.Level4Effect);
SetGenomePower(i, genome.Level5Effect);
SetGenomePower(i, genome.Level6Effect);
SetGenomePower(i, genome.Level7Effect);
SetGenomePower(i, genome.Level8Effect);
SetGenomePower(i, genome.Level9Effect);
SetGenomePower(i, genome.Level10Effect);
WriteTimestampedLogEntry("Created Genome Structure:"+GenomeID+" with ID:"+IntToString(i));
}
I hate these forums - half my post just got cut off
GRRR
Anyway - I am trying to compile, but I get the following:
genome_inc.nss(321): Error: Element "Level1Effect" is not a member of the structure
genome_inc.nss(321): Error: Required argument missing in call to "SetGenomePower"
genome_inc.nss(322): Error: Element "Level2Effect" is not a member of the structure
igenome_inc.nss(322): Error: Required argument missing in call to "SetGenomePower"
genome_inc.nss(323): Error: Element "Level3Effect" is not a member of the structure
genome_inc.nss(323): Error: Required argument missing in call to "SetGenomePower"
genome_inc.nss(324): Error: Element "Level4Effect" is not a member of the structure...
Does nwscript not handle nested structures?





Retour en haut







