Jump to content
  • 0

help me to check what's wrong with my script


undeadrex

Question


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   0
  • Joined:  02/27/12
  • Last Seen:  

post-2756-0-64070500-1330371644_thumb.jpg

Edited by undeadrex
Link to comment
Share on other sites

10 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

getmapmobs is not a script command anymore.

It was removed in r15530 and merged into mobcount.

Edited by Brian
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   0
  • Joined:  02/27/12
  • Last Seen:  

im getting this error if i use mobcount

[Error]: Loading NPC file: npc/newerth/mvp.txt

script error on npc/newerth/mvp.txt line 364

parse_callfunc: not enough arguments, expected ','

362 : {

363 : if (getmapxy($@mapname$,@mapx,@mapy,0) != 0) goto M_End;

* 364 : if (mobcount($@mapname$')') goto l_nos;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

[Error]: Loading NPC file: npc/newerth/mvp.txt

script error on npc/newerth/mvp.txt line 364

parse_callfunc: not enough arguments, expected ','

362 : {

363 : if (getmapxy($@mapname$,@mapx,@mapy,0) != 0) goto M_End;

* 364 : if (mobcount($@mapname$')') goto l_nos;

It's because you are using the command wrong. The syntax is:

mobcount("<map name>","<event label>")

Read the documentation in /trunk/doc/script_commands.txt or on the wiki page: mobcount.

Edited by Brian
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   0
  • Joined:  02/27/12
  • Last Seen:  

hmm ... are u sure that " getmapmobs " is not a script command ?? cause i've seen other script, is using the getmapmobs command too /hmm

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

yes..it is a script command...perhap it is dropped after update..xD

correct me if i am wrong hahaa

*getmapmobs("<map name>")

This function will return the total count of monsters currently located on the
specified map. If the map name is given as "this", the map the invoking
character is on will be used. If the map is not found, or the invoker is not a
character while the map is "this", it will return -1.


anyway..use mobcount would be better than using getmapmobs

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

Well, currently it is not in /src/map/script.c

I don't remember if it used to be a command and was removed. /hmm

ah it was removed in r15530

Edited by Brian
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   0
  • Joined:  02/27/12
  • Last Seen:  

well ... i seriously have no idea how to use " mobcount " ... unless u can do me one from my script with the mobcount command ... i've tried using mobcount and event label ... but im receiving others errors @@

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

try this...

[ Pastebin ] MVP / MiniBoss Summoner

i unable to test script currently..due to my pc spoiled.

i just sketch the script only..>.<

Edited by Emistry
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   0
  • Joined:  02/27/12
  • Last Seen:  

[Error]: Loading NPC file: npc/newerth/mvp.txt

script error on npc/newerth/mvp.txt line 15

parse_line: need ';'

10 : warp .@MapList$[ ( (( .@Room * 10 ) - 10 ) + .@Selected ) ],104,97;

11 : end;

12 :

13 : OnInit:

14 : set .MapLists$[0],

* 15 : "mvp01"','"mvp02","mvp03","mvp04","mvp05","mvp06","mvp07","mvp08","mvp09","mvp10", // Room 01 - 10

16 : "mvp11","mvp12","mvp13","mvp14","mvp15","mvp16","mvp17","mvp18","mvp19","mvp20", // Room 11 - 20

17 : "mvp21","mvp22","mvp23","mvp24","mvp25","mvp26","mvp27","mvp28","mvp29","mvp30"; // Room 21 - 30

18 : end;

19 : }

20 :

[Error]: npc_event: event not found [summoner#10::OnSummoned]

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

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