• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Need Help How to remove perk/s from your officer?

wasabi

Landlubber
How can I remove perk/s from my officers/companions using DEV mode (debuger.c)?

I tried to type this code => ch.perks.list.Ciras = "-1";
or
ch.perks.list.Ciras = "0";
or
ch.perks.list.Ciras = -1;

and it does not work...

This is what my code looks like below VVV


string descF20 = "remove perks";

void CalculateInfoDataF20()
{
totalInfo = descF20;
// -->

if (sti(pchar.Fellows.Passengers.navigator) != -1)
{
ref ch=getcharacter(sti(pchar.fellows.passengers.navigator));

ch.perks.list.Ciras = "-1";
}
else
{
totalInfo = "No officer";
}

// <--
totalInfo = totalInfo + NewStr() + NewStr() +
"The command is executed successfully!";
SetFormatedText("INFO_TEXT",totalInfo);
}


Does anyone know how to remove perk/s? Please help... Thank you...

Aye! sir...
 
Perhaps:
Code:
DeleteAttribute(ch, "perks.list.Ciras");
Are you sure that code is actually executing? Add a line like this as well:
Code:
trace("Removing Perks");
Now when you execute your code, that line will be written to compile.log if you have error logging enabled.
So if you see that line, at least you know your code WAS executed.
 
Back
Top