IRE-Mudlet-Mapping / ire-mapping-script

IRE Mapping Script
http://wiki.mudlet.org/w/IRE_mapping_script
17 stars 34 forks source link

mmp.areatabler not defined #17

Closed csmall closed 7 years ago

csmall commented 8 years ago

I have had a lot of the mapping functions fail on me. Debugging the problem they all complain that mmp.areatabler is not defined. Indeed if I run

lua display(mmp.areatabler)

it displays nil.

The work-around is to type

lua mmp_regenerate_areas()

when I first log in.

Looking at the code, I can see no place where mmp.areatabler is defined except in that function. I would have thought it may have been loaded from a file once generated.

To me the fix is either:

I cannot see how, but I assume it has something to do with me upgrading from 3.0.0-delta to the latest in the release_30 git repository. That's where the problem happened OR because release_30 enabled me to download a new map, the problem is with the download and process map code.

csmall commented 8 years ago

So, this is how it seems to happen:

So! I know that mmp.map_data_changed is not being called (I put a cecho in it) so I think something happened to the events being fired in release_30.

jgh713 commented 8 years ago

I'm having a similar issue having upgraded to a dev compile of a newer 3.0. It seems to be caused by the fact that the map isn't loaded before the scripts anymore. In the mudlet I've got, the map isn't loaded at all until you open a map window. I have to open my map before I run mmp.init() (which runs the mmp_regenerate_areas() function and fixes a few other quirks caused by the function failing). I'm not sure what would need to be changed for that to work properly, honestly. I'll fiddle with 3.0, but it's really a pain.

vadi2 commented 8 years ago

That's always been the case, the map is loaded only when the mapper is open. Do you have a script to create the mapper widget?

On Mon, 26 Sep 2016 7:23 am jgh713, notifications@github.com wrote:

I'm having a similar issue having upgraded to a dev compile of a newer 3.0. It seems to be caused by the fact that the map isn't loaded before the scripts anymore. In the mudlet I've got, the map isn't loaded at all until you open a map window. I have to open my map before I run mmp.init() (which runs the mmp_regenerate_areas() function and fixes a few other quirks caused by the function failing). I'm not sure what would need to be changed for that to work properly, honestly. I'll fiddle with 3.0, but it's really a pain.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/IRE-Mudlet-Mapping/ire-mapping-script/issues/17#issuecomment-249447579, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGxjGrGCQ3eCA2AdqDfL_10NEhtyaCeks5qtuZugaJpZM4KFwij .

jgh713 commented 8 years ago

@vadi2 I'd always been able to use goto and related mapper functions without opening the map window. No script to open the mapper. At least, not that I knew of.

SlySven commented 8 years ago

Curious - Is your "map window" inside a Geyser (or possible Vyzor) window or is it in a separate dockable widget?

If it is the latter then yes, I can confirm that the map is not loaded until the map widget is created - whereas if it is part of a scripted system then it is loaded during start-up for the former....

jgh713 commented 8 years ago

Mudlet 2.1 - Fresh profile: https://ada-young.appspot.com/pastebin/PEztZ-1T

Map data is all available. Works the same using 3.0.0-delta fresh from the site.

Mudlet 3.0 dev (308 i think?) - Fresh profile: https://ada-young.appspot.com/pastebin/4qhASVcX

Map has to be opened for any map data to be available, due to map audit.

Map data is available from the moment the mapper is loaded, unless there's something I seem to be missing.

SlySven commented 8 years ago

The issue for Mudlet is that it only allows one mapper per profile and if there is a map fitted into a scripted system that takes "ownership" of the mapper and you cannot then have a dockable widget one.

This is why the latter is not created until it is requested and one has not already been made by a script.

Incidentally, if you comment out code in a script that uses geyser/vyzor to make a map and click to created a dock-widget one and edited the script to remove the comment and rerun the script in the same session it will create a mapper as per the script - but it leaves an orphaned dockable widget one which appears to operate but will IIRC then crash when you try to change area with the selector in it's controls!

The same sort of thing about NOT clearing up the dockable mapper is an issue when running Mudlet and multi-playing {see Mudlet bug 1229493}: closing one profile that has such a mapper does not remove the dockwidget from the application and restarting another instance of the same profile in the same session will produce a fresh, new dockable mapper - and doing things with the orphaned one is likely to produce a crash in the same way... :unamused:

Map data is available from the moment the mapper is loaded, unless there's something I seem to be missing.

It is more the case that the mapper is available from the point the map data is loaded (or for a virgin profile from the point the user decides to download an IRE Map if that is an option or create their own) - if I recall correctly.

keneanung commented 7 years ago

Closed with #29 (I hope)