Jump to content
  • 0

Script command definitions


Latheesan

Question


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  50
  • Reputation:   53
  • Joined:  11/27/11
  • Last Seen:  

Hi,

 

I have a quick question. Take a look at this list of script command definitions (from http://svn.rathena.org/svn/rathena/trunk/src/map/script.c):

 

/// script command definitions/// for an explanation on args, see add_buildin_funcstruct script_function buildin_func[] = {    // NPC interaction    BUILDIN_DEF(mes,"s*"),    BUILDIN_DEF(next,""),    BUILDIN_DEF(close,""),    BUILDIN_DEF(close2,""),    BUILDIN_DEF(menu,"sl*"),    BUILDIN_DEF(select,"s*"), //for future jA script compatibility    BUILDIN_DEF(prompt,"s*"),etc...

 

Can someone help me understand what these values specified inside the double quotes, next to each function name.

 

for e.g: s l * i ? v r

 

I am guessing "s" is string and "i" is int, but what do others means?

 

Also, if nothing is specified within double quotes, does that mean that particular script command doesn't take any arguments?

 

Thanks.

  • Upvote 1
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  379
  • Reputation:   304
  • Joined:  11/10/11
  • Last Seen:  

v - value (string, int or reference)

s - string

i - int

r - reference (variable)

l - label

? - optional parameter

* - as you want optionals parameters

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  50
  • Reputation:   53
  • Joined:  11/27/11
  • Last Seen:  

Thanks allot :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...