towerofnix / slw

name blatantly borrowed under fair use from @an-ok-squirrel
https://towerofnix.github.io/slw/
7 stars 2 forks source link

Add Debug info #23

Closed dekrain closed 8 years ago

dekrain commented 8 years ago

...Thanks to (maybe) large files for hour delay

dekrain commented 8 years ago

I cannot test this because of error:

Tile.js:53:Uncaught RangeError: Tile W not found.

a row's "length" property is 52, but real size is 51

dekrain commented 8 years ago

Hmm... I tried to change CRLF to LF, but without effects...

bates64 commented 8 years ago

Tile.js:53:Uncaught RangeError: Tile W not found.

That means that there's a Tile in your level W that isn't defined. Check src/levels.toml.

dekrain commented 8 years ago

It's probably because index.js is encoded in CRLF format, but it should be LF. Originally in logs are line-end character. I removed it. It's probably CR character. In my Path2D parser I used

code.split(/[\n|\r\n]/)
bates64 commented 8 years ago

That'll make no difference, we're using a build system that removes most (if not all) line breaks / carriage returns anyway.

That means that there's a Tile in your level W that isn't defined. Check src/levels.toml.

There's a W in your tilemap somewhere that's confusing it at runtime not compile-time.

dekrain commented 8 years ago

Yes, it's because gulp changed ~~~~\n~~~~ to ~~~~\r\n~~~~

towerofnix commented 8 years ago

I'm not honestly sure where a string of ~ would appear anyways.

The original problem is "I can't run the game". Just to clarify - can you build and run the game now?

dekrain commented 8 years ago

For example, in my src/levels.toml#L10

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[CR][LF]

gulp changes it to

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n

but expected is

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n
towerofnix commented 8 years ago

(this message has for convenience been deleted but I see what you mean sorry lol)

bates64 commented 8 years ago

Interesting. Out of interest, do you use Windows, @dekrain? I believe the rest of us use Linux/Mac so that's probably why you're getting a linefeed result.

bates64 commented 8 years ago

51b79807750fa0f009b9088769045c7e9f50fdc2 should fix your bug @dekrain - merge from master and build again to see if it fixes it.

dekrain commented 8 years ago

Yes, I'm using Windows. Thanks for that commit. Hmm... It seems that new plugin doesn't removes /\\r/ sequence