Jump to content
  • 0

Increase npc length name


HyperSonic2097

Question


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   0
  • Joined:  10/14/14
  • Last Seen:  

Hi.

I have a little problem with a script I wrote. For some reason i need to name npc like 

einbroch,238,224,4    duplicate(GG_Record_Mark_Main)    Einbroch Marker#1-2_uz1    1002
geffen,163,188,3    duplicate(GG_Record_Mark_Main)    Geffen Marker#1-2_uz1    1002
glast_01,200,280,0    duplicate(GG_Record_Mark_Main)    Glast Heim Marker#1-2_uz1    1002

but for Glast Heim Marker#1-2_uz1 i have this error when I reload the scripts:

npc_parsename: Name 'Glast Heim Marker#1-2_uz1 is too long (len=25) in file 'npc/custom/aggiuntivi/mark_warper_markwarper.txt', line 111. Truncating to 24 characters.

So I have tried to increase the max npc name characters in src/common/mmo.h in 

//For character names, title names, guilds, maps, etc.
//Includes null-terminator as it is the length of the array.
#define NAME_LENGTH (23 + 1)

but any value I set insted 23+1 (for example 24+1) when I recompile and launch the server gave me this error:

[warning] chrif_parse: session #6, intif ->parse failed (unrecognized command 0x0000).

Is there any way for increase npc name characters?

Edited by HyperSonic2097
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3123
  • Reputation:   1617
  • Joined:  03/26/12
  • Last Seen:  

Changing the max length will cause you problems. The easiest solution would be to call it "GH Marker" and be done with it.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   0
  • Joined:  10/14/14
  • Last Seen:  

6 hours ago, Akkarin said:

Changing the max length will cause you problems. The easiest solution would be to call it "GH Marker" and be done with it.

But in this case I have GH instead Glast Heim in warp list (the script retrieve the NPC name stored in sql directly, eliminating the word "Marker" for this)... I think i'll try with someting like 

query_sql "SELECT map,x,y,REPLACE(REPLACE(name,' Marker',''),'GlastH','Glast Heim') as name FROM placemark WHERE char_id = "+getcharid(0)+" AND type = "+@type+" ORDER BY priority DESC,name",@cmap$,@cx,@cy,.@name$;

it's not very elegant, but it's a workaround.

Anyway thanks for the reply!

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   431
  • Joined:  01/26/16
  • Last Seen:  

Not long ago we have adjusted maximum length of NPC name. Make sure you have latest version of rAthena running.

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...