Uppercase and lowercase in labels

maqc1

New member
Messages
51
Points
0
Location
Québec
Github
maqc1
Emulator
Hi all,

I am pretty new to Hercules (I have been using eAthena for the past 3 years) and the console throws me a lot of "possible use of wrong case" errors in my custom scripts. These errors are quite confusing since they tell me opposite things. For example :

case_e10.jpg


First error tells me to use lowercase.

Second error tells me to use uppercase.

Which one tells the truth? =P

I could not find anything about lowercase and uppercase on the wiki. Thank you!

 
@ both upper and lower case is in your script i think, try replacing all labels with just same case

 
I tried using only uppercase (except for OnClock labels) and it still asks me to use lowercase. So I guess the "recommanded use" is to only use lowercase?

 
Last edited by a moderator:
I successfully reproduce this problem

[Error]: script_add_str: detected possible use of wrong case in a script. Found'Ontest', probably meant to be 'OnTest' (in 'npc/zzz.txt').
Code:
prontera,155,185,5	script	kjdshfksjf	1_F_MARIA,{	monster "this",-1,-1,"--ja--",1002,1,strnpcinfo(0)+"::OnTest";	close;OnTest:	dispbottom "test";	end;}prontera,155,185,5	script	kjdshfsksjf	1_F_MARIA,{	monster "this",-1,-1,"--ja--",1002,1,strnpcinfo(0)+"::Ontest";	close;Ontest:	dispbottom "test";	end;}
exactly the same as I posted in rathenahttps://rathena.org/board/tracker/issue-6988-monster-with-onkill-label/

eathena and rathena script engine is not case sensitive,

that's why this kind of error may happen in those emulator

when you have 1 label as upper case and another as lower case

hercules script engine can detect this kind of error and tells you to correct it, to prevent the label not being executed

 
Last edited by a moderator:
The first occurred case is stored, so if server first reads a script which have ONQUIT, and you have OnQuit too, it will show you to change to ONQUIT.

 
Back
Top