I included 2 plots in my module core, to track plot items for each, and when I compile, I now get a message saying :
plt_blablabla.nss(5): Likely Duplicate Constant Declaration (while compiling module_core.nss)
What does it mean?
My includes are :
#include "global_objects_h"
#include "events_h"
#include "log_h"
#include "wrappers_h"
#include "plt_wh_fest_fur_quest"
#include "plt_intro_cinematic"
#include "plt_wh_fest_knaves"
Weird compiling error
Débuté par
wyvern14
, déc. 24 2009 06:23
#1
Posté 24 décembre 2009 - 06:23
#2
Posté 24 décembre 2009 - 06:33
For the record, here is what the plt.nss has inside when extracted with notepad:
// Plot defines
// The Knaves' Challenge
const string PLT_WH_FEST_KNAVES = "3A830E378C78498BBFBC976FF2CCC5CB";
const int QUEST_ACCEPTED = 0;
const int KIPP_RECRUITED = 1;
const int FIND_THE_FEATHERS = 2;
const int BLUE_FOUND = 3;
const int WHITE_FOUND = 4;
const int GREEN_FOUND = 5;
const int CHALLENGE_COMPLETED = 6;
const int ALL_FEATHERS_FOUND = 256;
// Plot defines
// The Knaves' Challenge
const string PLT_WH_FEST_KNAVES = "3A830E378C78498BBFBC976FF2CCC5CB";
const int QUEST_ACCEPTED = 0;
const int KIPP_RECRUITED = 1;
const int FIND_THE_FEATHERS = 2;
const int BLUE_FOUND = 3;
const int WHITE_FOUND = 4;
const int GREEN_FOUND = 5;
const int CHALLENGE_COMPLETED = 6;
const int ALL_FEATHERS_FOUND = 256;
#3
Posté 24 décembre 2009 - 07:12
It probably means you have the same plot state name in more than one plot e.g. QUEST_ACCEPTED.
You can get away with that if all plot processing happens in dedicated plot event scripts (one per plot), but if you need to refer to the values for multiple plots explicitly in the same script, the names have to be unique.
You can get away with that if all plot processing happens in dedicated plot event scripts (one per plot), but if you need to refer to the values for multiple plots explicitly in the same script, the names have to be unique.
#4
Posté 24 décembre 2009 - 08:08
Ah, good to know! I just renamed all my flags with appropriate, descriptive quest accepted and finished and all, and it compiles!
#5
Posté 24 décembre 2009 - 08:48
You don't have to run all your plots in the module_core script. You can assign a script to the area you are in to track certain plots and have it update that way. You don't even need to have a unique main flag like knaves_quest_accepted. You can keep them all quest_accepted and use this event to change your flags:
WR_SetPlotFlag(PLT_WH_FEST_KNAVES, QUEST_ACCEPTED, TRUE);
WR_SetPlotFlag(PLT_WH_FEST_KNAVES, QUEST_ACCEPTED, TRUE);
#6
Posté 24 décembre 2009 - 09:26
The only plots I include in the module core are those where item acquisition for plot needs to be recognised (if items have acquired set to 1 in their variables), since only the module receives that information.





Retour en haut






