Jump to content

small problem here


Recommended Posts

i have made my cutscenes and put into dialogue, but theres an error everytime i export or save

 

Error: 14:21:54 - genpt_loghain_events.nss - genpt_loghain_events.nss(96): Invalid declaration type

 

i went to it and all it is is : if (nValue == TRUE)

 

i don't know why it errors heres the whole code

 

//::///////////////////////////////////////////////

//:: Plot Events Template

//:: Copyright © 2003 Bioware Corp.

//:://////////////////////////////////////////////

/*

Plot events

*/

//:://////////////////////////////////////////////

//:: Created By: Mark Barazzuol

//:: Created On: Feb 21st, 2009

//:://////////////////////////////////////////////

 

#include "log_h"

#include "utility_h"

#include "wrappers_h"

#include "plot_h"

 

#include "plt_genpt_loghain_events"

#include "plt_mnp000pt_generic"

 

int StartingConditional()

{

event eParms = GetCurrentEvent(); // Contains all input parameters

 

int nType = GetEventType(eParms); // GET or SET call

int nResult = FALSE; // used to return value for DEFINED GET events

int nFlag = GetEventInteger(eParms, 1); // The bit flag # being affected

 

object oParty = GetEventCreator(eParms); // The owner of the plot table for this script

object oConversationOwner = GetEventObject(eParms, 0); // Owner on the conversation, if any

object oPC = GetHero();

 

string strPlot = GetEventString(eParms, 0); // Plot GUID

 

 

 

plot_GlobalPlotHandler(eParms); // any global plot operations, including debug info

 

if(nType == EVENT_TYPE_SET_PLOT) // actions -> normal flags only

{

int nValue = GetEventInteger(eParms, 2); // On SET call, the value about to be written (on a normal SET that should be '1', and on a 'clear' it should be '0')

int nOldValue = GetEventInteger(eParms, 3); // On SET call, the current flag value (can be either 1 or 0 regardless if it's a set or clear event)

// IMPORTANT: The flag value on a SET event is set only AFTER this script finishes running!

 

switch(nFlag)

{

// No standard flag scripted.

}

}

else // EVENT_TYPE_GET_PLOT -> defined conditions only

{

switch(nFlag)

{

case LOGHAIN_EVENT_WARDEN_TEST_PASSED_AT_CAMP:

{

int bCamp = WR_GetPlotFlag(PLT_MNP000PT_GENERIC, MAIN_PLOT_GENERIC_PARTY_AT_CAMP, TRUE);

int bPassed = WR_GetPlotFlag(PLT_GENPT_LOGHAIN_EVENTS, LOGHAIN_EVENT_WARDEN_TEST_PASSED, TRUE);

 

if (bCamp && bPassed)

nResult = TRUE;

 

break;

 

}

case LOGHAIN_EVENT_AFTER_MAKE_LOVE:

{

if (nValue == TRUE)

 

WR_SetPlotFlag(strPlot, LOGHAIN_EVENT_ON, TRUE);

WR_SetPlotFlag(PLT_GENPT_APP_LOGHAIN, APP_LOGHAIN_MAKE_LOVE, TRUE, TRUE);

UT_Talk(ologhain, oPC);

 

}

 

break;

}

case LOGHAIN_EVENT_MAKE_LOVE:

{

int bHuman = WR_GetPlotFlag(PLT_GEN00PT_CLASS_RACE_GEND, GEN_RACE_HUMAN,TRUE);

int bDwarf = WR_GetPlotFlag(PLT_GEN00PT_CLASS_RACE_GEND, GEN_RACE_DWARF,TRUE);

int bElf = WR_GetPlotFlag(PLT_GEN00PT_CLASS_RACE_GEND, GEN_RACE_ELF,TRUE);

int bCamp = WR_GetPlotFlag(PLT_MNP000PT_GENERIC,MAIN_PLOT_GENERIC_PARTY_AT_CAMP);

}

break;

 

}

} // Sex scenes with Loghain

 

resource rLoghainSex_DwarfFemale = R"loghain_df.cut";

resource rLoghainSex_HumanFemale = R"loghain_hf.cut";

resource rLoghainSex_ElfFemale = R"loghain_ef.cut";

 

resource rCutscene;

 

if (nValue == TRUE)

{

// If Player is Human

if (bHuman)

{

rCutscene = rLOGHAINSex_HumanFemale;

}

// If Player is Dwarf

else if (bDwarf)

{

rCutscene = rLoghainSex_DwarfFemale;

}

// If Player is Elf

else if (bElf)

{

rCutscene = rLoghainSex_ElfFemale;

}

// Play proper cutscene (assuming one was picked.)

//if the group is at camp

if((rCutscene != INVALID_RESOURCE) && (bCamp == TRUE))

{

CS_LoadCutscene(rCutscene, PLT_GENPT_LOGHAIN_EVENTS, LOGHAIN_EVENT_AFTER_MAKE_LOVE);

}

else

{

WR_SetPlotFlag(PLT_GENPT_LOGHAIN_EVENTS,LOGHAIN_EVENT_AFTER_MAKE_LOVE,TRUE,TRUE);

}

}

break;

 

plot_OutputDefinedFlag(eParms, nResult);

 

return nResult;

}

 

please help i would like for this to work

 

thanks

Link to comment
Share on other sites

i apologize, should have checked structure before posting, and not posted at all if unsure, edited for meaningless suggestion, sorry bout that :] Edited by veteran_gamer
Link to comment
Share on other sites

this is for my Loghain romance project, kiss works but i got another problem with him.

 

heres a script i got for him

 

// Loghain main plot events

 

#include "log_h"

#include "utility_h"

#include "wrappers_h"

#include "plot_h"

#include "campaign_h"

#include "approval_h"

 

#include "plt_genpt_Loghain_defined"

#include "plt_genpt_Loghain_main"

#include "plt_genpt_Loghain_talked"

#include "plt_genpt_Loghain_events"

#include "plt_genpt_app_Loghain"

#include "plt_gen00pt_class_race_gend"

 

#include "den_constants_h"

#include "camp_constants_h"

 

#include "plt_cod_cha_Loghain"

 

 

int StartingConditional()

{

event eParms = GetCurrentEvent(); // Contains all input parameters

int nType = GetEventType(eParms); // GET or SET call

string strPlot = GetEventString(eParms, 0); // Plot GUID

int nFlag = GetEventInteger(eParms, 1); // The bit flag # being affected

object oParty = GetEventCreator(eParms); // The owner of the plot table for this script

object oConversationOwner = GetEventObject(eParms, 0); // Owner on the conversation, if any

int nResult = FALSE; // used to return value for DEFINED GET events

object oPC = GetHero();

 

plot_GlobalPlotHandler(eParms); // any global plot operations, including debug info

 

int nLoghain = APP_FOLLOWER_Loghain;

 

if(nType == EVENT_TYPE_SET_PLOT) // actions -> normal flags only

{

int nValue = GetEventInteger(eParms, 2); // On SET call, the value about to be written (on a normal SET that should be '1', and on a 'clear' it should be '0')

int nOldValue = GetEventInteger(eParms, 3); // On SET call, the current flag value (can be either 1 or 0 regardless if it's a set or clear event)

// IMPORTANT: The flag value on a SET event is set only AFTER this script finishes running!

switch(nFlag)

{

case Loghain_MAIN_FRIEND_END_REFUSED:

{

Approval_ChangeApproval(nLoghain, -10);

break;

 

case Loghain_MAIN_KISS_AT_TENT:

{

// CINEMATICS: fade to black - transport to tent.

// CINEMATICS: Loghain and the PC kiss

/*

int nDwarf = WR_GetPlotFlag(PLT_GEN00PT_CLASS_RACE_GEND,GEN_RACE_DWARF,TRUE);

int nElf = WR_GetPlotFlag(PLT_GEN00PT_CLASS_RACE_GEND,GEN_RACE_ELF,TRUE);

resource rKiss;

 

if(nDwarf == TRUE)

{

rKiss = R"kiss_df.cut";

}

else if(nElf == TRUE)

{

rKiss = R"kiss_ef.cut";

}

else

{

rKiss = R"kiss_hf.cut";

}

CS_LoadCutscene(rKiss);

*/

 

break;

}

 

}

 

}

 

return nResult;

}

 

my error is : E: 21:40:53 - genpt_loghain_main.nss - genpt_loghain_main.nss(82): Unexpected end compound statement

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...