Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Categories

Dark Dreams of Furiae - a new module for NWN:EE! Buy now
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

HorseCreateHorse script

Why won't this lexicon example script compile? There are only 2 examples I have seen to make scripts to create a mount for a PC, and they're both identical to this. I have a compiled version I imported along with the mounts that works, but I want to change it to work on an item activation. However, it won't compile. Duplicate function error for some reason.

#include "x3_inc_horse"
 
 
void main()
{
   object oPC    = GetPCSpeaker();
   object oHorse = HorseCreateHorse(GetResRef(GetObjectByTag("HorseTemplate")), GetLocation(oPC), oPC, "NewHorse");
}
#include "x3_inc_horse"


void main()
{
   object oPC    = GetItemActivator();
   object oHorse = HorseCreateHorse(GetResRef(GetObjectByTag("HorseTemplate")), GetLocation(oPC), oPC, "NewHorse");
}

Comments

  • ProlericProleric Member Posts: 875
    edited May 2020
    The version you posted on the Vault compiles under both 1.69 and EE 1.80 so I wonder whether you've edited x3_inc_horse or are using an unofficial compiler.

    The version you posted here has two void main() sections. Perhaps you mean that neither script will compile for you standalone, but, as published, it won't compile because you have two scripts in one.

    EpicValor
  • EpicValorEpicValor Member Posts: 8
    It's 2 different scripts. The bb code combined them for some reason. It may be that the mod I'm trying to compile them in is using the CEP 2.65. I never touched the x3_inc_horse script, but the CEP may have.

  • EpicValorEpicValor Member Posts: 8
    An old X0_INC_HENAI was causing the issue. I don't know how I ended up with an old version, but it's gone now.

    Problem solved. Thanks for your help.

Sign In or Register to comment.