Skip to content

this_player(1) is not not accurately reporting 0 when it should #892

@gesslar

Description

@gesslar

In our error_handler() we have a line of code to determine if an error being generated was the result of a player action. If it is, then print a message to the player and for admins/log files, write what the player was and what they typed.

In the case where this_player(1) should result in 0, it doesn't do the above, it just simply logs to the log and notifies wizards.

This worked perfectly under MudOS, but when we switched to FluffOS, this behaviour changed somehow.

Our players are getting genuinely (and rightfully) confused when they receive bug messages for literally doing nothing than maybe just logging in or being the unfortunate person to have been resolved by this_player(1) when it really should have been 0.

I've attached what I feel is the most obvious example.

  1. I created an object that has a heart_beat and in the heart_beat generate DIV/0 error.
  2. Initiate the object
  3. All characters relog into the mud, with the player character logging in last and saying hi
  4. When the heart_beat runs, it errors, as it should, but, it sends messages to a player who had nothing to do with execution chain, and in fact was just the last person to type something.

Per the documentation,

If this_player is called as this_player(1) then the returned value will be the interactive that caused the calling function to be called.

I think it is clearly shown how this is not the behaviour being demonstrated here.

Can we please correct this behaviour to be as expected?

2022-05-06_18-51-32.mp4

error code for test object

void runit()
{
    call_out("callit", 20) ;
}

void callit()
{
    set_heart_beat(1) ;
}

void heart_beat()
{
    int i = 1 ;
    int j = 0 ;
    int k ;

    k = i / j ;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions