LPMuds.net

Lib Discussion => Dead Souls Support => Topic started by: lokkje on June 26, 2011, 10:17:08 pm

Title: 'home' command fails
Post by: lokkje on June 26, 2011, 10:17:08 pm
One night I log off, leaving one of my creators to his own devices. The next morning I get a message saying "i broke my workroom", and when I try to "home makaela" I get this:

Code: [Select]
--- ChaosRealmReborn
2011.06.26-17.01,12
*Value being indexed is zero.
Object: /secure/daemon/players at line 723

'<fake>' at /secure/save/creators/l/loki (/<driver>) at line 0
'cmdAll' at /secure/save/creators/l/loki (/lib/command.c) at line 231
'cmd' at /secure/cmds/builders/home at line 55
'unguarded' at /secure/sefun/sefun at /secure/sefun/security.c:104
'apply_unguarded' at /secure/daemon/master at line 606
'CATCH' at /secure/daemon/master at line 606
'<fake>' at /secure/cmds/builders/home (/<driver>) at line 0
'(: <code>($1), "makaela" :)' at /secure/cmds/builders/home at line 55
'GoHome' at /secure/cmds/builders/home at line 24
'GetHomeRoom' at /secure/daemon/players at line 723
Trace written to /log/catch

--- ChaosRealmReborn
2011.06.26-17.01,12
**Value being indexed is zero.
Object: /secure/daemon/master at line 608

'<fake>' at /secure/save/creators/l/loki (/<driver>) at line 0
'cmdAll' at /secure/save/creators/l/loki (/lib/command.c) at line 231
'cmd' at /secure/cmds/builders/home at line 55
'unguarded' at /secure/sefun/sefun at /secure/sefun/security.c:104
'apply_unguarded' at /secure/daemon/master at line 608
Trace written to /log/runtime

Now I have no idea what he did, and neither, apparently, does he. Can anyone help me solve this issue? The workroom is working perfectly now, and I get this error when I try to access any other workroom via the home command, except my own. I'm at a loss as to what to do to fix this. Any help is, of course, much appreciated!
Title: Re: 'home' command fails
Post by: Nulvect on June 27, 2011, 01:05:14 pm
Alright, let's run through this.

Code: [Select]
   unguarded( (: LoadPlayer(gplayer) :) );
    ret = GetPlayerVariable(val);
    RestoreObject(SaveFile);
    return ret;
Code: [Select]
   if(member_array(val,variables(this_object())) == -1){
        //write("No such player variable exists.");
        return ret;
    }
Code: [Select]
   ret = fetch_variable(val);
    return ret;
Code: [Select]
$ grep Paranoia *.c
creator.c:    if(ret && GetParanoia("inventory_monitoring"))
creator.c:    if(GetParanoia("move_monitoring")){
interactive.c:private mapping Paranoia = ([]);
interactive.c:    Paranoia = (["homeroom" : user_path(GetKeyName(), 1)+"workroom"]);
interactive.c:mixed GetParanoia(string str){
interactive.c:    if(Paranoia[str]) return copy(Paranoia[str]);
interactive.c:mixed SetParanoia(string str, mixed val){
interactive.c:    Paranoia[str] = val;
interactive.c:    return copy(Paranoia[str]);
interactive.c:    if(ret && GetParanoia("inventory_monitoring")){
interface.c:    if(this_object()->GetParanoia("cursefilter")){

I hope this helps you with your immediate issue and your debugging processes in the future. Note that this was done with Dead Souls 3.1a11, things may be slightly different on other versions.
Title: Re: 'home' command fails
Post by: Raudhrskal on June 27, 2011, 04:02:25 pm
Paranoia modes are things that you can turn on to be notified when, for example, someone else is "sneaking" some nasty invisible object into your inventory.

But yeah, sounds like a problem in his player savefile, having dropped that variable.

In such case, you probably could somehow set it on him manually, by editiong the .o in worst case (backup first!).

Orrrrr... make the actual code more robust, but checking if the mapping is valid, and if it's not making some error-handling ordefault-fallback code execute instead of erroring out.