Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ Yet another mapper thread. Almost got it.
Yet another mapper thread. Almost got it.
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1
2
Posted by
| Engvar
(24 posts) Bio
|
Date
| Reply #15 on Sat 13 Apr 2019 05:13 PM (UTC) |
Message
| Ok, I inserted it and this is what it shows now when I use the 'look' command.
Quote:
Shrine to Mercy and Deliverance
MY WILDCARDS ARE
0="Shrine to Mercy and Deliverance"
Run-time error
Plugin: Inquisition_Mapper (called from world: GameName)
Function/Sub: got_room_name called by trigger
Reason: processing trigger "room_name" when matching line: "Shrine to Mercy and Deliverance"
[string "Plugin: Inquisition_Mapper"]:220: attempt to get length of local 'name' (a nil value)
stack traceback:
[string "Plugin: Inquisition_Mapper"]:220: in function <[string "Plugin: Inquisition_Mapper"]:213>
A sweet, soporific scent lingers upon the air within this shrine, the calming
smell drifting from the riots of fresh red and purple poppies that completely
blanket the floor. Wide chevrons of vivid red ibha decorate the dark stone
walls of the shrine. The gems glimmer in the soft, flickering candlelight of
braun sconces ringing the room. The glass-smooth domed ceiling reflects hazy
images of the blooms on the ground and curves to a sharp point at the center.
Two oversized misericorde daggers cross above the archway to the south, their
blades flecked with dried red blood.
[Exits: south]
(Glowing) A poppy-shaped braun pedestal holds a book on its open petals here.
<1728/1728Hp 1722/1722Mn 622/622Mv | 54G 903S |89/205W| | City of the Gods | V862>
Run-time error
Plugin: Inquisition_Mapper (called from world: GameName)
Function/Sub: got_prompt called by trigger
Reason: processing trigger "prompt" when matching line: "<1728/1728Hp 1722/1722Mn 622/622Mv | 54G 903S |89/205W| | City of the Gods | V862>"
[string "Plugin: Inquisition_Mapper"]:107: bad argument #2 to 'format' (string expected, got nil)
stack traceback:
[C]: in function 'format'
[string "Plugin: Inquisition_Mapper"]:107: in function 'supplied_get_room'
...Users\Anschutz\Desktop\CoM\MUSHclient\lua\mapper.lua:219: in function 'get_room'
...Users\Anschutz\Desktop\CoM\MUSHclient\lua\mapper.lua:937: in function 'draw'
[string "Plugin: Inquisition_Mapper"]:203: in function <[string "Plugin: Inquisition_Mapper"]:162>
I also set up a simple trigger for the room name that just output the name again right below it, and it seems to be capturing it correctly.
<triggers>
<trigger
back_colour="8"
bold="y"
enabled="y"
match="^(?!\(White Aura\)|\(Charmed\)|You).*$"
match_back_colour="y"
match_bold="y"
match_inverse="y"
match_italic="y"
match_text_colour="y"
regexp="y"
send_to="2"
sequence="100"
text_colour="15"
>
<send>%0</send>
</trigger>
</triggers>
Quote:
Shrine to Mercy and Deliverance
Shrine to Mercy and Deliverance
A sweet, soporific scent lingers upon the air within this shrine, the calming
smell drifting from the riots of fresh red and purple poppies that completely
blanket the floor. Wide chevrons of vivid red ibha decorate the dark stone
walls of the shrine. The gems glimmer in the soft, flickering candlelight of
braun sconces ringing the room. The glass-smooth domed ceiling reflects hazy
images of the blooms on the ground and curves to a sharp point at the center.
Two oversized misericorde daggers cross above the archway to the south, their
blades flecked with dried red blood.
[Exits: south]
(Glowing) A poppy-shaped braun pedestal holds a book on its open petals here.
<1738/1738Hp 1752/1752Mn 622/622Mv | 54G 903S |89/205W| | City of the Gods | V862>
| Top |
|
Posted by
| Engvar
(24 posts) Bio
|
Date
| Reply #16 on Sat 13 Apr 2019 05:53 PM (UTC) |
Message
| This is the error I'm getting after the room name.
Quote:
Run-time error
Plugin: Inquisition_Mapper (called from world: GameName)
Function/Sub: got_room_name called by trigger
Reason: processing trigger "room_name" when matching line: "At the End of the Northern Road"
[string "Plugin: Inquisition_Mapper"]:217: attempt to get length of local 'name' (a nil value)
stack traceback:
[string "Plugin: Inquisition_Mapper"]:217: in function <[string "Plugin: Inquisition_Mapper"]:213>
And then one after the prompt line.
Quote:
Run-time error
Plugin: Inquisition_Mapper (called from world: GameName)
Function/Sub: got_room_name called by trigger
Reason: processing trigger "room_name" when matching line: "At the End of the Northern Road"
[string "Plugin: Inquisition_Mapper"]:217: attempt to get length of local 'name' (a nil value)
stack traceback:
[string "Plugin: Inquisition_Mapper"]:217: in function <[string "Plugin: Inquisition_Mapper"]:213>
I made another trigger to grab the vnum and repeat it back in the output window, and it seems to be targeting correctly on that also. | Top |
|
Posted by
| Fiendish
USA (2,541 posts) Bio
Global Moderator |
Date
| Reply #17 on Sat 13 Apr 2019 06:04 PM (UTC) Amended on Sat 13 Apr 2019 06:11 PM (UTC) by Fiendish
|
Message
| So if your new print statements show that the room name is wildcard 0 and that there's no wildcard 1, why do you have
local name = wildcards[1]
in your got_room_name function? |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Engvar
(24 posts) Bio
|
Date
| Reply #18 on Sat 13 Apr 2019 06:18 PM (UTC) Amended on Sat 13 Apr 2019 06:23 PM (UTC) by Engvar
|
Message
| I changed it and it worked! I walked around and it mapped a couple dozen rooms. Got room names and descriptions, and even walked to the room when I clicked it!
Then it broke again... I haven't changed anything, just reinstalled it, but I'm still getting this message now, no more map.
Quote:
Run-time error
Plugin: Inquisition_Mapper (called from world: GameName)
Function/Sub: got_prompt called by trigger
Reason: processing trigger "prompt" when matching line: "<1738/1738Hp 1752/1752Mn 308/622Mv | 4G 1224S |90/205W| | Serian Center Square | V5810>"
[string "Plugin: Inquisition_Mapper"]:170: bad argument #2 to 'format' (string expected, got nil)
stack traceback:
[C]: in function 'format'
[string "Plugin: Inquisition_Mapper"]:170: in function <[string "Plugin: Inquisition_Mapper"]:162>
It did that when I got back to an area that I had it working in once before. I understand that it's storing the map in a different file, is it possible that it had a problem with there already being something there?
I went back to a new area and reinstalled and it worked again. Walked back up and it linked the map together. Then I hit a room and it closed the map and gave me this error.
Quote:
Run-time error
Plugin: Inquisition_Mapper (called from world: GameName)
Function/Sub: got_prompt called by trigger
Reason: processing trigger "prompt" when matching line: "<1738/1738Hp 1752/1752Mn 611/622Mv | 4G 1224S |90/205W| | Northern Road | V4367>"
[string "Plugin: Inquisition_Mapper"]:107: bad argument #2 to 'format' (string expected, got nil)
stack traceback:
[C]: in function 'format'
[string "Plugin: Inquisition_Mapper"]:107: in function 'supplied_get_room'
...Users\Anschutz\Desktop\CoM\MUSHclient\lua\mapper.lua:219: in function 'get_room'
...Users\Anschutz\Desktop\CoM\MUSHclient\lua\mapper.lua:591: in function 'draw_room'
...Users\Anschutz\Desktop\CoM\MUSHclient\lua\mapper.lua:989: in function 'draw'
[string "Plugin: Inquisition_Mapper"]:203: in function <[string "Plugin: Inquisition_Mapper"]:162>
| Top |
|
Posted by
| Engvar
(24 posts) Bio
|
Date
| Reply #19 on Sat 13 Apr 2019 06:24 PM (UTC) |
Message
| It seems to always go down at the same spot, but I'm not sure why.
Quote:
MUSHclient mapper installed, version 2.6
Mapper plugin 'save state' file name is:
.\worlds\plugins\state\601e886123571f750e3774a3-2a5655924080806ca252f1e6-state.xml
Consider backing up the above file regularly as it has the mapper database in it.
Reinstalled plugin Inquisition_Mapper (2a5655924080806ca252f1e6)
You take a moment to look at your immediate surroundings.
Along the Northern Road
As the forest slowly thins out to the west in the distance, the sight of a
majestic and snowy mountain range can clearly be seen towering in the horizon.
There seems to be no passable trail to reach these mountains at this section
of the road but one can be seen faintly off towards the south. To the east of
the road, the plains begin to form into soft and rolling hills that carry
grass on their backs like hair. The grass doesn't seem as green here as it
does to the south for the cold climate here hampers its growth. To the north
and south, the northern road goes on.
[Exits: north south]
(Charmed) A brawny black bear cub paws at the ground, snuffling.
<1738/1738Hp 1752/1752Mn 620/622Mv | 4G 1224S |90/205W| | Northern Road | V4365>
Along the Northern Road
The northern road heads on here through the rolling, green hills to the west
and the snowy, mountain range to the east. Although not snowy here, a cold
air comes in to the east from the frozen mountains that tower very far in the
distance. Even at their distance, the eastern mountains can clearly be seen
with their snow-capped peaks and the frozen tundra around them. One mountain
in particular stands tall above the rest although it is somewhat set apart
from the others. The northern road continues on towards the north while
retreating south as well.
[Exits: north south]
A brawny black bear cub has arrived from the south.
<1738/1738Hp 1752/1752Mn 619/622Mv | 4G 1224S |90/205W| | Northern Road | V4366>
Along the Northern Road
Scattered forest accompanies the northern road to its eastern side. Grass
covers the land between the trees although it is starting to thin due to the
colder temperature here in northern Alandis. Far beyond these random trees
and light grass lies the outline of a mountain range covered in snow and ice.
To the west lies a somewhat warmer land with green hills of grass passing
softly across the horizon. Heading north and south, the road presses its dirt
trail on.
[Exits: north south]
A brawny black bear cub has arrived from the south.
<1738/1738Hp 1752/1752Mn 618/622Mv | 4G 1224S |90/205W| | Northern Road | V4367>
Run-time error
Plugin: Inquisition_Mapper (called from world: GameName)
Function/Sub: got_prompt called by trigger
Reason: processing trigger "prompt" when matching line: "<1738/1738Hp 1752/1752Mn 618/622Mv | 4G 1224S |90/205W| | Northern Road | V4367>"
[string "Plugin: Inquisition_Mapper"]:107: bad argument #2 to 'format' (string expected, got nil)
stack traceback:
[C]: in function 'format'
[string "Plugin: Inquisition_Mapper"]:107: in function 'supplied_get_room'
...Users\Anschutz\Desktop\CoM\MUSHclient\lua\mapper.lua:219: in function 'get_room'
...Users\Anschutz\Desktop\CoM\MUSHclient\lua\mapper.lua:591: in function 'draw_room'
...Users\Anschutz\Desktop\CoM\MUSHclient\lua\mapper.lua:989: in function 'draw'
[string "Plugin: Inquisition_Mapper"]:203: in function <[string "Plugin: Inquisition_Mapper"]:162>
Works until I get to that area. Then I get that error and it closes the map. | Top |
|
Posted by
| Engvar
(24 posts) Bio
|
Date
| Reply #20 on Sat 13 Apr 2019 06:46 PM (UTC) |
Message
| I think I've figured it out. I found where the maps were saved in the state file. Deleted those and had it start over, and it's letting me go everwhere at the moment.
Thank you so much for all your help! | Top |
|
Posted by
| Fiendish
USA (2,541 posts) Bio
Global Moderator |
Date
| Reply #21 on Sat 13 Apr 2019 07:03 PM (UTC) Amended on Sun 14 Apr 2019 11:43 AM (UTC) by Fiendish
|
Message
| Awesome.
Just in case you need to come back again, I find that it's always a good idea to dig into exactly what the error message is telling you before trying to figure out what might have caused it holistically.
In this case:
Quote: Function/Sub: got_prompt called by trigger
Reason: processing trigger "prompt" when matching line: "<1738/1738Hp 1752/1752Mn 618/622Mv | 4G 1224S |90/205W| | Northern Road | V4367>"
[string "Plugin: Inquisition_Mapper"]:107: bad argument #2 to 'format' (string expected, got nil)
Means that in your got_prompt function you called string.format and it expected the second value given to it to be a string but the second value was actually nil. You should trace backward to figure out _why_ the second argument was nil and not a string as expected.
I'll drop a quote here from a book titled Think Like a Programmer: An Introduction to Creative Problem Solving by V. Anton Spraul
Quote: In some situations, borrowed code will work initially, but when the programmer attempts to modify or expand the borrowed code base, the lack of deep comprehension removes the possibility of an organized approach. The programmer then resorts to flailing about and trial and error, thus violating the first and most important of our general problem-solving rules: Always have a plan. |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Nick Gammon
Australia (23,162 posts) Bio
Forum Administrator |
Date
| Reply #22 on Sun 14 Apr 2019 08:16 AM (UTC) Amended on Sun 14 Apr 2019 08:18 AM (UTC) by Nick Gammon
|
Message
| You know, I've put a considerable amount of effort into making the error messages useful.
Function/Sub: got_prompt called by trigger
Reason: processing trigger "prompt" when matching line: "<1738/1738Hp 1752/1752Mn 618/622Mv | 4G 1224S |90/205W| | Northern Road | V4367>"
[string "Plugin: Inquisition_Mapper"]:107: bad argument #2 to 'format' (string expected, got nil)
So what's this telling us?
- The problem starts off with a trigger
- The function the trigger calls is "got_prompt"
- The trigger is named "prompt"
- The line it is matching on (<1738/1738Hp 1752/1752Mn 618/622Mv | 4G 1224S |90/205W| | Northern Road | V4367>)
- What plugin processed this trigger (Inquisition_Mapper)
- What line in the plugin (script) it was (107)
- What the problem was (bad argument to the format function)
- Which argument it was (2)
- What the function expected (a string)
- What it got (nil)
This is pure gold. It tells you where to start looking, and what to look for.
Compare this to some of the web sites I have visited. You try to buy something and you get a dialog box "An error has occurred".
You aren't sure if:
- You made some error in what you entered (eg. dates the wrong way around)
- Your credit card has been charged (so if you try again you will be charged twice).
- The order has been processed but there is a problem with shipping.
- The order will be shipped but there is a problem telling you that.
- Some other problem ... what?
I get that it is frustrating when things don't work, but those error messages (complex though they look) are your friends. Interpret them and you will be able to fix the problem, or at least narrow it down. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Engvar
(24 posts) Bio
|
Date
| Reply #23 on Mon 15 Apr 2019 04:18 PM (UTC) |
Message
| Fiendish, you're absolutely correct. I do intend to get to the point where I'm able to figure out what the error messages are pointing me to. I hope I haven't been annoying you here, but I've learned an incredible amount from you in this thread about troubleshooting. I really can't thank you enough.
Nick, I cannot express how much I appreciate how much work you've put into this to make it as easy as possible for beginners. I'm slow going, I only get a couple hours a week to work on this, but your documentation has helped tremendously. I'm saving this breakdown of the error messages to use in the future. I didn't know what everything in them meant (still don't fully, but that's because I'm new to a lot of the terminology) and couldn't understand what it was pointing me to.
The last time I did anything remotely like this was learning HTML back in high school 15 years ago. If they had half the documentation you have I may have stuck with it. As it is, I'm really enjoying learning it, and I'm proud of what I've learned so far.
The game I'm working on this for only has 3 active staff members, and only one of them has programming experience. The other two are strictly RP staff. We all played the game in high school, and are trying to get it going again. I've been trying to help them come up to date in order to attract some new players, and will hopefully get a link to download MushClient and a package of plugins on the website for new players to use. Just sharing the healthbars you made and the OOC chat window have brought a few people back, and having a map is by far the biggest request. This game was a huge part of my growing up, I don't want to see if fade away.
I guess what I'm getting at is that I'm sorry if I came across as frustrated, but I guarantee that the frustration I had was with me and not with your work. I am nothing but appreciative for the work you've put into this, because I would have no chance of getting these things accomplished from scratch with the time I have available, and my lack of experience. Thank you. | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
59,105 views.
This is page 2, subject is 2 pages long:
1
2
It is now over 60 days since the last post. This thread is closed.
Refresh page
top