Hercules icon indicating copy to clipboard operation
Hercules copied to clipboard

Documentation and warnings related to mapflags scripts commands

Open haarenas opened this issue 6 years ago • 3 comments

Describe the bug Documentation of commands like setmapflag, gatmapflag and removemapflag specify the use of mf_xxx constants in lower case, but if you use lower case they dont do anything. I looked at script.h for those constants and they are all UPPER CASE.

Using those constants in upper case make those commands work, but a warning appears in the terminal/console saying you should use lower case.

haarenas avatar Feb 25 '19 18:02 haarenas

really ? I just test one of my script that having setmapflag --> this one works perfectly fine

no, the constants you should be looking for, should be https://github.com/HerculesWS/Hercules/blob/stable/doc/constants.md#mapflags and everything there is lower case

btw I do agree our emotions constants should be in UPPER_CASE https://github.com/HerculesWS/Hercules/blob/82d634ad431b2ffe7077a561f4eafd2486ede44b/src/map/clif.h#L147-L238 the source use upper case, but script constants use lower case https://github.com/HerculesWS/Hercules/blob/stable/doc/constants.md#emotes however changing that will throw errors on many scripts

AnnieRuru avatar Feb 25 '19 20:02 AnnieRuru

for case-sensitivity may refer @MishimaHaruna's https://github.com/HerculesWS/Hercules/issues/685#issuecomment-136308412 for reference.

Emistry avatar Mar 02 '19 15:03 Emistry

Mapflags has been refactored in #2654 .

Emistry avatar Sep 25 '20 02:09 Emistry