Jump to content
  • 0
maqc1

Uppercase and lowercase in labels

Question

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!

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

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.

Share this post


Link to post
Share on other sites
  • 0

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?

Edited by Tyrfing

Share this post


Link to post
Share on other sites
  • 0

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').
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 rathena

https://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

Share this post


Link to post
Share on other sites
  • 0

Ok thanks for the answers! I will only use lowercase from now on =P.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.