"nomask" appearing via inheritance

I will preface this by saying it is a weird one, and that you have done WAY more than enough to help us at this point and we are already in your debt…so if you ever want us to shut up just say so!

This is all on the latest (as of the time of this post) ‘master’ branch compiled with no options

We started seeing this error for a shadow on players: *Illegal to shadow 'nomask' function "health_heart_beat"

I 100% guarantee the function ‘health_heart_beat’ is NOT declared as nomask. In fact, there is not a single nomask in our player object. This is vindicated by the first fix I discovered - we can redefine the function in the top level player object (health_heart_beat is defined 4 inherits lower) :

void health_heart_beat( int gp_bonus, int hp_bonus ) {::health_heart_beat(gp_bonus,hp_bonus);}

If ‘health_heart_beat’ was declared ‘nomask’ then this would not even compile. In fact if I do go back and declare it as a nomask and try to compile this fix we get the expected result: Illegal to redefine 'nomask' function "health_heart_beat" before the end of line

So this is already super weird. Things that make it weirder:

  1. I next went and tried to mask every other function in the same inherited file as ‘health_heart_beat’… they all work fine.
  2. The error does not exist in our creator objects (which inherits the player object).

I went through and iteratively tried every single difference between our player object and our creator object to see if I could figure it out… and the result is bizarre: If you inherit literally -ANY- file with -AT LEAST ONE- function defined in it -BEFORE- you inherit the player object… the nomask error disappears.

In all of these examples ‘/global/player_test.c’ is just:
string conjunctionjunction() {return "whatsyourfunction";}

Examples of /global/player.c where ‘nomask’ errors DO exist:
A)

inherit "/global/player/mortal";
inherit "/global/player_test.c";
void create()
{
    mortal::create();
}

B)

string conjunctionjunction() {return "whatsyourfunction";}
inherit "/global/player/mortal";
void create()
{
    mortal::create();
}

Examples of /global/player.c where ‘nomask’ errors DO NOT exist:
A) (switched order of inherits)

inherit "/global/player_test.c";
inherit "/global/player/mortal";
void create()
{
    mortal::create();
}

B) masking a supposedly nomask function

inherit "/global/player/mortal";
void health_heart_beat( int gp_bonus, int hp_bonus ) {::health_heart_beat(gp_bonus,hp_bonus);}
void create()
{
    mortal::create();
}

Other maybe useful info: files I tried to inherit first which did NOT fix the error:

  1. Empty file
  2. Single define
  3. Single include
  4. commented out single function
  5. single variable

The only other insight I can offer is this error didn’t exist before the memory leak fixes were pushed live.

I thought maybe ‘heart_beat’ in the function name was somehow maybe bad now so I went through and sed’d the entire lib to replace ‘health_heart_beat’ with ‘be_healthy’. The result: ``*Illegal to shadow ‘nomask’ function “be_healthy”.```

nice catch! It is an big introduced recently, fix will be there momentarily!

Thanks!

Ooo! I found something interesting.

We can control which function returns the ‘nomask’ error by adjusting the number of functions defined in the 'player_test" inherit. Everytime you add a function to player_test the ‘nomask’ error shifts to the next function defined in the functions() list.

A little more sluthing and: The default function number which errors (when no player_test inherit is used) is number 394 in the functions() list. Every additional function you define in player_test() increases that by 2, but adding a function to ‘player_test’ also pushes the list by 1… so the next error is on 396 which was previously 395.

I have no idea what these numbers signify. But our player functions() list is size 1007.

Oh, good. I’ll stop poking around then. Thanks!

fix is merged to master! Please retest!

Can’t reproduce it. Going through stress tests!

Most recent driver pushed to live, no issues so far, knock on wood.

Live player testing ensuing. Looking good!

Great progress!