Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by stuntmanmikey

Yo,

When saving a level on OSX the generated .js file has escape characters in it like this:

ig.module( \'game.levels.main\' )
.requires(\'impact.image\')
.defines(function(){
LevelMain=/JSON[/{\"entities\":[{\"type\":\"EntityPuck\",\"x\":360,\"y\":216},{\"type\":\"EntityPaddleCpu\" ...

When you try to load that in your browser, it fails. What I was able to do was do a search/replace in my editor, replacing \' with ' and then replacing \" with ". That fixes it, but I have to do that every time I save.

I'm on OSX 10.6.5 running Impact 1.14 (the latest as of right now). I've tried Safari, Chrome and FireFox and it's doing it in all of them.

-Mike

P.S. Awesome job

1 decade ago by 80bit

Running Chrome on my end and am not getting that issue, clean files for me... weird...??

1 decade ago by dominic

Ah, damn. That's PHP's Magic Quotes at work.

Please disable magic quotes in your php.ini for now. I will workaround this issue in future versions if magic quotes are enabled.

Thanks for bringing that to my attention!

1 decade ago by stuntmanmikey

Ahh, touche. That fixed me. I'm using MAMP and Magic Quotes were enabled in my php.ini (which probably explains why it was happening to me and not 80bit).

So no more need for my workaround ;)

1 decade ago by bpsd

Thanks Stuntman & Dominic, I was having the same issue and figured I was just missing something in the documentation. This might be a good piece to include as a side note in the Weltmeister documentation, at least while everyone is just starting with the tool.
Page 1 of 1
« first « previous next › last »