Skip to content

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: 1,316
    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.
  • EpicValorEpicValor Member Posts: 12
    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: 12
    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.