monster860 / FastDMM

A robust BYOND map editor
GNU General Public License v3.0
35 stars 16 forks source link

Unable to open /tg/ repo .dme #49

Open ShizCalev opened 6 years ago

ShizCalev commented 6 years ago

image

https://github.com/monster860/FastDMM/blob/e62b4b7e93742e4cebc261ec1f4e93a1d796b833/src/main/java/com/github/monster860/fastdmm/objtree/ObjectTree.java#L206

Java 1.8.0_151 byond 512.1402

Qbopper commented 6 years ago

still persists - issue happened out of nowhere, fastdmm hasn't changed at all

Rockdtben commented 6 years ago

The issue was related to our codebase having a string like this: "The circuit accepts a reference to thing to be grabbed. It can store up to 10 things. Modes: 1 for grab. 0 for eject the first thing. -1 for eject all."

And the macro for addition/subtraction picking up the . -1 as a macro.

PKPenguin321 commented 6 years ago

might as well link the patched release https://github.com/Rockdtben/FastDMM/releases/tag/v0.7

RemieRichards commented 6 years ago

@Rockdtben it accepts quite a few random setups, such as infinite decimal places in a number (1.2.3 - 1), to fix that (and the previous bug) I recommend:

Flavour Regex
Generic (\d+.?\d*)[ \t]*(\+\|-)[ \t]*(\d+.?\d*)
Java (\\d\\+\\.?\\d*)[ \t]*(\\+\|\\-)[ \\t]*(\\d\\+\\.?\\d*)

and yes, it is dividing when it should subtract

Rockdtben commented 6 years ago

@RemieRichards Thank you for checking that for me. I will see about getting that fixed during my next layover flight.

I'm going to add some unit tests on that regex matcher and include some of the know bad statements.

Did you have any other examples of bad matching? Might as well get as many test cases as possible.

RemieRichards commented 6 years ago

Well, the old regex is quite poor. ([\\d\\.]+)[ \\t]*(\\+|\\-)[ \\t]*([\\d\\.]+)

But it mostly fails on decimal places.

In terms of finding a int/float number with regex, ([\\d\\.]+) is just unusable, I won't insult you by presuming you know nothing of regex, but that block (occurring twice in the regex itself) is saying "there must be at least one number or dot but there can be infinite of each", so this is why . is seen as a number, and why it doesn't care if there's more than 1.

My "number block" is (\\d+.?\\d*) which says "at least one number, then optionally one dot, then infinitely optional numbers", eg 13 is valid, since the dot is optional, and 1.3 is valid since it does have the dot, and 1.3333333 is valid too, and so on.

Chewyyy commented 6 years ago

I get this error when trying to load my .dme file. I tried 0.6 and 0.7, no luck. Have never been able to get it to work

https://gyazo.com/160aa01ee7e53431eb04d3f163f43df4

RemieRichards commented 6 years ago

@Chewyyy by the looks of it you probably have a bad #include statement. pastebin your .dme.

Chewyyy commented 6 years ago

Was I suppose to add an #include statement into my dme for this to work?

I didn’t see anything

RemieRichards commented 6 years ago

@Chewyyy

The dme contains one #include statement for every file you include in your project. They normally get there by ticking/unticking the file in dreammaker.

But the line that errored inside FastDMM looks like it found a DME line like: #include "" or #include instead of: #include "some/path/to/a/file.dm"

Which as far as I'm aware, DM doesn't naturally make broken #includes, thats why I wanted you to copypaste your DME somewhere so I/someone could try and find the line (if there is one)

Could be a presumption in FastDMM though, but without seeing the DME, no idea.

Chewyyy commented 6 years ago

`` // DM Environment file for .dme. // All manual changes should be made outside the BEGIN and END blocks. // New source code should be placed in .dm files: choose File/New --> Code File.

define EVENT_SCHEDULING_LOG_ERRORS

define EVENT_SCHEDULING_LOG_WARNINGS

// BEGIN_INTERNALS // END_INTERNALS

// BEGIN_FILE_DIR

define FILE_DIR .

define FILE_DIR "Code"

define FILE_DIR "Code/RyuShinto"

define FILE_DIR "Code/RyuShinto/Clothes"

define FILE_DIR "Code/RyuShinto/Fixed Map"

define FILE_DIR "Code/RyuShinto/Mask"

define FILE_DIR "Icons"

define FILE_DIR "Icons/! Code me in !"

define FILE_DIR "Icons/! Code me in !/Auras -Done"

define FILE_DIR "Icons/! Code me in !/Base Icons"

define FILE_DIR "Icons/! Code me in !/Chewyy Made Me!"

define FILE_DIR "Icons/! Code me in !/Clothes -Done"

define FILE_DIR "Icons/! Code me in !/Hair"

define FILE_DIR "Icons/! Code me in !/Misc"

define FILE_DIR "Icons/! Code me in !/NPCs"

define FILE_DIR "Icons/! Code me in !/Techniques - Done"

define FILE_DIR "Icons/! Code me in !/Technology"

define FILE_DIR "Icons/! Code me in !/Turf - Done"

define FILE_DIR "Icons/Aura Icons"

define FILE_DIR "Icons/Base Icons"

define FILE_DIR "Icons/Clothing Icons"

define FILE_DIR "Icons/Hair Icons"

define FILE_DIR "Icons/Hair Icons/SSB"

define FILE_DIR "Icons/Hair Icons/SSG"

define FILE_DIR "Icons/Hair Icons/SSR"

define FILE_DIR "Icons/Magic Icons"

define FILE_DIR "Icons/Misc Icons"

define FILE_DIR "Icons/NPC Icons"

define FILE_DIR "Icons/Rebirth Icons"

define FILE_DIR "Icons/Rebirth Icons/icons"

define FILE_DIR "Icons/Rebirth Icons/icons/Turfs"

define FILE_DIR "Icons/Rebirth Icons/icons/unsorted"

define FILE_DIR "Icons/Rebirth Icons/icons/Weather"

define FILE_DIR "Icons/Rebirth Icons/IntIcons"

define FILE_DIR "Icons/Rebirth Icons/Old Icons"

define FILE_DIR "Icons/Technique Icons"

define FILE_DIR "Icons/Technique Icons/Blasts"

define FILE_DIR "Icons/Technology Icons"

define FILE_DIR "Icons/Turf Icons"

define FILE_DIR "Sounds"

define FILE_DIR "Sounds/Xia SFX v0.1"

define FILE_DIR "Sounds/Xia SFX v0.1/music songs"

// END_FILE_DIR

// BEGIN_PREFERENCES

define DEBUG

// END_PREFERENCES

// BEGIN_INCLUDE

include <deadron\xml\XML.dme>

include <lummoxjr\iconprocs\IconProcs.dme>

include "Abridged.dmf"

include "Code!!atom_vars.dm"

include "Code\Aliens.dm"

include "Code\Ascension.dm"

include "Code\Attack.dm"

include "Code\Clickinz.dm"

include "Code\Cooking.dm"

include "Code\Cybernetics.dm"

include "Code\DeadZone.dm"

include "Code\Dragon Balls.dm"

include "Code\Grabbing.dm"

include "Code\Guide.dm"

include "Code\Magic Fire.dm"

include "Code\Mating.dm"

include "Code\NOTES.dm"

include "Code\Oozaru.dm"

include "Code\Paid.dm"

include "Code\Planet Destruction.dm"

include "Code\Reincarnation.dm"

include "Code\Shops.dm"

include "Code\Sims.dm"

include "Code\Skills.dm"

include "Code\Split Forms.dm"

include "Code\Stat Points.dm"

include "Code\Stats.dm"

include "Code\Story.dm"

include "Code\Train.dm"

include "Code\Years.dm"

include "Code\Admin_debugcoms.dm"

include "Code\Admin\admin.dm"

include "Code\Admin\adminsay.dm"

include "Code\Admin\alertAdmins.dm"

include "Code\Admin\ban.dm"

include "Code\Admin\Better Rewards.dm"

include "Code\Admin\checkLog.dm"

include "Code\Admin\createObject.dm"

include "Code\Admin\editvars2.dm"

include "Code\Admin\jump.dm"

include "Code\Admin\observe.dm"

include "Code\Admin\playsound.dm"

include "Code\Admin\rank_tab.dm"

include "Code\Admin\ranks.dm"

include "Code\Admin\reward.dm"

include "Code\Admin\spawnAtom.dm"

include "Code\Admin\statlag.dm"

include "Code\Admin\stealthMode.dm"

include "Code\Admin\uncategorized.dm"

include "Code\Admin\verbs.dm"

include "Code\Admin\warn.dm"

include "Code\AI\npc_areas.dm"

include "Code\AI\obj_ai.dm"

include "Code\build_system_buildmain.dm"

include "Code\build_system\glob_buildlists.dm"

include "Code\build_system\upgrade.dm"

include "Code\build_system\grid_system_gridmain.dm"

include "Code\build_system\grid_system\grid.dm"

include "Code\Client\client.dm"

include "Code\Client\stylesheet.dm"

include "Code\custom_abilities\cosmic.dm"

include "Code\custom_abilities\Custom Abilities.dm"

include "Code\custom_abilities\dragon.dm"

include "Code\custom_abilities\shadow_king.dm"

include "Code\custom_abilities\vampire.dm"

include "Code\custom_abilities\void_spawn.dm"

include "Code\Datums\coords.dm"

include "Code\Datums\mind.dm"

include "Code\Datums\restricted_number.dm"

include "Code\Lib\AStar.dm"

include "Code\Lib\bubblesort.dm"

include "Code\Lib\FileDialog.dm"

include "Code\Lib\helper_procs.dm"

include "Code\Lib\EventHandler\Quicksort\QuickSort.dm"

include "Code\Lib\Events__ErrorHandling.dm"

include "Code\Lib\Events\CommonEvents.dm"

include "Code\Lib\Events\Event.dm"

include "Code\Lib\Events\EventScheduler.dm"

include "Code\Mob\assess.dm"

include "Code\Mob\bodysize.dm"

include "Code\Mob\communication.dm"

include "Code\Mob\mob.dm"

include "Code\Mob\movement.dm"

include "Code\Mob\new_character.dm"

include "Code\Mob\stat_loop.dm"

include "Code\Mob\status_sched.dm"

include "Code\Mob\swimming.dm"

include "Code\Mob\vars.dm"

include "Code\Mob\who.dm"

include "Code\Mob\Inventory\clothes.dm"

include "Code\Mob\Inventory\consumables.dm"

include "Code\Mob\Inventory\Inventory.dm"

include "Code\Mob\Inventory\Technology\armor.dm"

include "Code\Mob\Inventory\Technology\cloningtanks.dm"

include "Code\Mob\Inventory\Technology\comm_devices.dm"

include "Code\Mob\Inventory\Technology\digging.dm"

include "Code\Mob\Inventory\Technology\drills.dm"

include "Code\Mob\Inventory\Technology\guns.dm"

include "Code\Mob\Inventory\Technology\nuke.dm"

include "Code\Mob\Inventory\Technology\bombs\bomb.dm"

include "Code\Mob\Inventory\Technology\bombs\detonator.dm"

include "Code\Mob\Inventory\Technology\bombs\procs.dm"

include "Code\Mob\roleplay_interface.dm"

include "Code\Mob\skills!general.dm"

include "Code\Mob\skills\customization.dm"

include "Code\Mob\skills\explosion.dm"

include "Code\Mob\skills\focus.dm"

include "Code\Mob\skills\kaioken.dm"

include "Code\Mob\skills\limit_breaker.dm"

include "Code\Mob\skills\pc_old.dm"

include "Code\Mob\skills\shockwave.dm"

include "Code\Mob\skills\time_freeze.dm"

include "Code\Mob\skills\range!projectiles.dm"

include "Code\Mob\skills\range\beam.dm"

include "Code\Mob\skills\range\beam_behavior.dm"

include "Code\Mob\skills\range\blast.dm"

include "Code\Mob\skills\range\procs.dm"

include "Code\Mob\skills\range\beams\dodompa.dm"

include "Code\Mob\skills\range\beams\final_flash.dm"

include "Code\Mob\skills\range\beams\galic_gun.dm"

include "Code\Mob\skills\range\beams\kamehameha.dm"

include "Code\Mob\skills\range\beams\masenko.dm"

include "Code\Mob\skills\range\beams\piercer.dm"

include "Code\Mob\skills\range\beams\ray.dm"

include "Code\Mob\skills\range\blasts\charge.dm"

include "Code\Mob\skills\range\blasts\death_ball.dm"

include "Code\Mob\skills\range\blasts\genki_dama.dm"

include "Code\Mob\skills\range\blasts\genocide.dm"

include "Code\Mob\skills\range\blasts\homing_finisher.dm"

include "Code\Mob\skills\range\blasts\kienzan.dm"

include "Code\Mob\skills\range\blasts\kikoho.dm"

include "Code\Mob\skills\range\blasts\makosen.dm"

include "Code\Mob\skills\range\blasts\sokidan.dm"

include "Code\Mob\skills\range\blasts\spinblast.dm"

include "Code\Mob\Training\meditating.dm"

include "Code\Mob\Training\train_verb.dm"

include "Code\Obj\atom.dm"

include "Code\Obj\enlarge.dm"

include "Code\Obj\warper.dm"

include "Code\RyuShinto! Map Test -- Chewyy.dm"

include "Code\RyuShinto! Weather -- Chewyy.dm"

include "Code\RyuShinto\Activities.dm"

include "Code\RyuShinto\AdminHelp_System.dm"

include "Code\RyuShinto\Assign Race Stats.dm"

include "Code\RyuShinto\Better Body Parts New.dm"

include "Code\RyuShinto\Better Cameras.dm"

include "Code\RyuShinto\Better Communication.dm"

include "Code\RyuShinto\Better Contacts.dm"

include "Code\RyuShinto\Better Customization.dm"

include "Code\RyuShinto\Better Factions.dm"

include "Code\RyuShinto\Better Hair.dm"

include "Code\RyuShinto\Better Races - No Size.dm"

include "Code\RyuShinto\Better RP Mode.dm"

include "Code\RyuShinto\Better RP Points.dm"

include "Code\RyuShinto\Better Saves.dm"

include "Code\RyuShinto\Better Stat Focus.dm"

include "Code\RyuShinto\Confirm.dm"

include "Code\RyuShinto\death - Chewyy.dm"

include "Code\RyuShinto\FBM.dm"

include "Code\RyuShinto\Filters.dm"

include "Code\RyuShinto\Golden Frieza.dm"

include "Code\RyuShinto\Gravity - Chewyy.dm"

include "Code\RyuShinto\Hive Mind.dm"

include "Code\RyuShinto\Languages.dm"

include "Code\RyuShinto\Machine Force.dm"

include "Code\RyuShinto\Magic Force.dm"

include "Code\RyuShinto\Map - Chewyy.dm"

include "Code\RyuShinto\Megaburst.dm"

include "Code\RyuShinto\Melee Skills.dm"

include "Code\RyuShinto\Mini Buffs.dm"

include "Code\RyuShinto\Mutations.dm"

include "Code\RyuShinto\New Expand.dm"

include "Code\RyuShinto\New Fly.dm"

include "Code\RyuShinto\obj - Chewyy.dm"

include "Code\RyuShinto\Olympian Might.dm"

include "Code\RyuShinto\Oni Buff.dm"

include "Code\RyuShinto\SkyBreak.dm"

include "Code\RyuShinto\SNj.dm"

include "Code\RyuShinto\Space - Chewyy.dm"

include "Code\RyuShinto\spells - Chewyy.dm"

include "Code\RyuShinto\Stat Mults.dm"

include "Code\RyuShinto\StatusBars.dm"

include "Code\RyuShinto\Super Mystic.dm"

include "Code\RyuShinto\Super Perfect Form.dm"

include "Code\RyuShinto\SwordForce.dm"

include "Code\RyuShinto\Throw.dm"

include "Code\RyuShinto\UltraInstinct.dm"

include "Code\RyuShinto\world - Chewyy.dm"

include "Code\RyuShinto\Fixed Map! Icon Code.dm"

include "Code\RyuShinto\Fixed Map\Area -- Chewyy.dm"

include "Code\RyuShinto\Fixed Map\GameMap - Copy 1.dmm"

include "Code\spam_filter\filter.dm"

include "Code\spam_filter\interface.dm"

include "Code\spam_filter\mute.dm"

include "Code\spam_filter\saveload.dm"

include "Code\spam_filter\SpamFilter.dm"

include "Code\tech_system_techmain.dm"

include "Code\tech_system\dummyObj.dm"

include "Code\tech_system\verbs.dm"

include "Code\tech_system\objects\drones.dm"

include "Code\tech_system\objects\resources.dm"

include "Code\tech_system\objects\slot_machines.dm"

include "Code\Turf\Turf.dm"

include "Code\Updates\Updates.dm"

include "Code\World\area.dm"

include "Code\World\bug_report.dm"

include "Code\World\logging.dm"

include "Code\World\schedulers.dm"

include "Code\World\icon_defs\objs\doors.dm"

include "Code\World\icon_defs\objs\props\bushes.dm"

include "Code\World\icon_defs\objs\props\chairs.dm"

include "Code\World\icon_defs\objs\props\edges.dm"

include "Code\World\icon_defs\objs\props\heatsource.dm"

include "Code\World\icon_defs\objs\props\misc.dm"

include "Code\World\icon_defs\objs\props\plants.dm"

include "Code\World\icon_defs\objs\props\rocks.dm"

include "Code\World\icon_defs\objs\props\signs.dm"

include "Code\World\icon_defs\objs\props\surf.dm"

include "Code\World\icon_defs\objs\props\tables.dm"

include "Code\World\icon_defs\objs\props\trees.dm"

include "Code\World\icon_defs\turfs\terrain\grass.dm"

include "Code\World\icon_defs\turfs\terrain\ground.dm"

include "Code\World\icon_defs\turfs\terrain\misc.dm"

include "Code\World\icon_defs\turfs\terrain\sky.dm"

include "Code\World\icon_defs\turfs\terrain\stairs.dm"

include "Code\World\icon_defs\turfs\terrain\tiles.dm"

include "Code\World\icon_defs\turfs\terrain\water.dm"

include "Code\World\icon_defs\turfs\upgradeable\roofs.dm"

include "Code\World\icon_defs\turfs\upgradeable\walls.dm"

include "Code\World\loadsav\items.dm"

include "Code\World\loadsav\turfs.dm"

include "Code\World\loadsav\worldsave.dm"

// END_INCLUDE ``

That is the DME

RemieRichards commented 6 years ago

@Chewyyy Ah, it's these lines:

#include <deadron\xml\XML.dme>
#include <lummoxjr\iconprocs\IconProcs.dme>

FastDMM doesn't yet support loading DMEs inside DMEs (like the two libraries you've imported above) As a work around, you can copy past the code from those libraries, if available, into their own folders within your own project, just until FastDMM supports libraries (I'm working on it)

Chewyyy commented 6 years ago

I moved the libraries over into their own folders and compiled, everything worked fine. I loaded up FastDMM, it didn't give the java errors, and began to load the map, and then after it finished, nothing popped up. Still says its awaiting a DMM to be loaded.

Rockdtben commented 6 years ago

https://github.com/tgstation/FastDMM

If you want the latest and greatest. I don't think monster860 is working on this anymore.