Issue information

Issue ID
#4591
Status
Fixed
Severity
None
Started
Hercules Elf Bot
Nov 30, 2010 20:27
Last Post
Hercules Elf Bot
Nov 30, 2010 20:27
Confirmation
N/A

Hercules Elf Bot - Nov 30, 2010 20:27

Originally posted by [b]BrianL[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=4591

After the change in r14495, getusers(1) does not work with an invisible NPC (not on a map).

QUOTE
*getusers(<type>)

This function will return a number of users on a map or the whole server. What
it returns is specified by Type.

Type can be one of the following values, which control what will be returned:

0 - Count of all characters on the map of the invoking character.
1 - Count of all characters in the entire server.
8 - Count of all characters on the map of the NPC the script is
running in
.

Type 0 requires an attached player (on a map),
type 8 requires the NPC to be on a map,
but shouldn't type 1 work even if the NPC is not on a map?


To reproduce:

CODE
-    script    test_getusers    -1,{
OnMinute00: OnMinute01: OnMinute02: OnMinute03: OnMinute04:
OnMinute05: OnMinute06: OnMinute07: OnMinute08: OnMinute09:
OnMinute10: OnMinute11: OnMinute12: OnMinute13: OnMinute14:
OnMinute15: OnMinute16: OnMinute17: OnMinute18: OnMinute19:
OnMinute20: OnMinute21: OnMinute22: OnMinute23: OnMinute24:
OnMinute25: OnMinute26: OnMinute27: OnMinute28: OnMinute29:
OnMinute30: OnMinute31: OnMinute32: OnMinute33: OnMinute34:
OnMinute35: OnMinute36: OnMinute37: OnMinute38: OnMinute39:
OnMinute40: OnMinute41: OnMinute42: OnMinute43: OnMinute44:
OnMinute45: OnMinute46: OnMinute47: OnMinute48: OnMinute49:
OnMinute50: OnMinute51: OnMinute52: OnMinute53: OnMinute54:
OnMinute55: OnMinute56: OnMinute57: OnMinute58: OnMinute59:
    debugmes "getusers(1) = " + getusers(1);
    end;
}