-
Notifications
You must be signed in to change notification settings - Fork 772
standardize script commands to small letters #2374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks, I feel haru too wanted script commands in small case. About "all" that should be case insensitive for now and prefer to have it recommendation that it should be small case |
|
on 2nd thought, actually we can just add "all" and "All" in the script.c although after so many years we have already adapted to this ... but its better be late than never |
|
Or change to strcmpi |
|
strcmpi will allow |
|
|
||
| BUILDIN_DEF(itempreview, "i"), | ||
| BUILDIN_DEF(enchantitem, "iii"), | ||
| BUILDIN_DEF(expandInventoryAck, "i?"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably wrong names better add with BUILDIN_DEF_DEPRECATED?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
huh ???
you are the one that made the commit ...
https://github.com/HerculesWS/Hercules/blob/master/npc/other/inventory_expansion.txt
and it used in this script, why deprecate it ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AnnieRuru , 4144 probably meant that deprecate commands with wrong names (camel case words) and add new lines for correct name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
erm ... this script command was just implemented recently ... right ?
its not like this script command already wide-spread ...
4194f0a#diff-f656dd88296837f04ab24f44eadffa86
hmm ... 2 months old ...
hmmmmmm ........ OK ........
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
near 2 months i think. merged to hercules 1 month ago
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm ... some in-game testing
- script khfsdkhjsf FAKE_NPC,{
OnPCLoginEvent:
debugmes getInventorySize +"";
}
already throw error like
[Error]: script_add_str: detected possible use of wrong case in a script. Found
'getInventorySize', probably meant to be 'getinventorysize' (in 'npc/zzz.txt').
you sure still need to fix this ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 month++ bump
I have tested this PR will throw error on parse time, with the error shown in above post
@4144
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please decrecated all commands with wrong case.
for example: BUILDIN_DEF2_DEPRECATED(expandinventoryack, "expandInventoryAck", "i?")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nonono, please test this PR, this doesn't need to deprecate
there is already the wrong case detection in the script engine to throw that error already
also, when I tested the BUILDIN_DEF2_DEPRECATED like you said, I did it before
the small letter case got deprecated as well for some reason ...
try it yourself
Signed-off-by: Haru <[email protected]>
9120ed9 to
b43d122
Compare
Pull Request Prelude
Issues addressed
http://herc.ws/board/topic/16526-some-upcoming-hercules-features/?do=findComment&comment=90516
Changes Proposed
All script commands should be in small letters
Affected Branches
Known Issues and TODO List
I don't want to memorize another special capital letter case
"All" and "all" is already enough for us -> #784
--> standardize into "all" for script commands -> #2380
so if Haru say again this isn't an issue, feel free to close this PRfor standardization, script commands has to be small letters