Aller au contenu

Photo

Weird compiling error


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
wyvern14

wyvern14
  • Members
  • 107 messages
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"

#2
wyvern14

wyvern14
  • Members
  • 107 messages
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;


#3
Proleric

Proleric
  • Members
  • 2 363 messages
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.

#4
wyvern14

wyvern14
  • Members
  • 107 messages
Ah, good to know! I just renamed all my flags with appropriate, descriptive quest accepted and finished and all, and it compiles!

#5
SilentCid

SilentCid
  • Members
  • 338 messages
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);








#6
wyvern14

wyvern14
  • Members
  • 107 messages
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.