Skip to content
Snippets Groups Projects
Commit ffd6ce7f authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

When the player is not created, number should be zero

Should make issue #392 go away, but the underlying CNW bug which
will cause the player that runs maint to see all NPCs remains.

For CNW, maintenance should absolutely be ran as a timed event,
with a real name that never gets an account.  Luckily, if there's
no dropfile, real name defaults to SYSOP, which should meet that
criteria.
parent 260f8b2e
Branches
Tags
No related merge requests found
...@@ -1208,7 +1208,7 @@ var vars = { ...@@ -1208,7 +1208,7 @@ var vars = {
'&time':{type:'fn', get:function() { return state.time }, set:function(x) { throw new Error('attempt to set &time'); } }, '&time':{type:'fn', get:function() { return state.time }, set:function(x) { throw new Error('attempt to set &time'); } },
'&timeleft':{type:'fn', get:function() { return parseInt((dk.user.seconds_remaining + dk.user.seconds_remaining_from - time()) / 60, 10) } }, '&timeleft':{type:'fn', get:function() { return parseInt((dk.user.seconds_remaining + dk.user.seconds_remaining_from - time()) / 60, 10) } },
'&sex':{type:'fn', get:function() { return player.sexmale }, set:function(sexmale) { player.sexmale = clamp_integer(sexmale, 's16') } }, '&sex':{type:'fn', get:function() { return player.sexmale }, set:function(sexmale) { player.sexmale = clamp_integer(sexmale, 's16') } },
'&playernum':{type:'fn', get:function() { return player.Record + 1 } }, '&playernum':{type:'fn', get:function() { return (player.Record === undefined ? 0 : player.Record + 1) } },
'&totalaccounts':{type:'fn', get:function() { return pfile.length } }, '&totalaccounts':{type:'fn', get:function() { return pfile.length } },
responce:{type:'int', val:0}, responce:{type:'int', val:0},
response:{type:'fn', get:function() { return vars.responce.val; }, set:function(val) { vars.responce.val = clamp_integer(val, 's32') } }, response:{type:'fn', get:function() { return vars.responce.val; }, set:function(val) { vars.responce.val = clamp_integer(val, 's32') } },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment