Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple story produces no content #36

Closed
joethephish opened this issue Oct 14, 2016 · 5 comments
Closed

Simple story produces no content #36

joethephish opened this issue Oct 14, 2016 · 5 comments

Comments

@joethephish
Copy link
Contributor

The following ink:

VAR x = false
{x:
    false
- else:
    true
}

...should print true. However when inkjs loads the json, it doesn't print anything.

Here is the JSON:

var storyContent = {"inkVersion":15,"root":["G>","ev",{"VAR?":"x"},"/ev",[{"->":"4.b","c":true},{"b":["^false","\n",{"->":"6"},null]}],[{"->":"5.b"},{"b":["^true","\n",{"->":"6"},null]}],"nop","G<","\n","done",{"global decl":["ev",0,{"VAR=":"x"},"/ev","end",null],"#f":3}]}

(ink version 0.6.1, inky version 0.6.0)

@joethephish
Copy link
Contributor Author

(This is causing The Intercept to break, as reported here.)

y-lohse added a commit that referenced this issue Oct 14, 2016
@y-lohse
Copy link
Owner

y-lohse commented Oct 14, 2016

The sort of bug that makes you wonder how it never bit before. I'm rolling out a new version with the fixes, thanks for the report and boiling down.

@y-lohse y-lohse closed this as completed Oct 14, 2016
@joethephish
Copy link
Contributor Author

It's definitely new - it was preventing The Intercept from working, and it definitely used to work!

@y-lohse
Copy link
Owner

y-lohse commented Oct 14, 2016

And yet the problem has been there for a long time (the Glue class not extending Object). Is it possible that in the newer versions, the compiled intercept changed so that the first bit of content became a Glue object?

@joethephish
Copy link
Contributor Author

Yeah, that sounds possible. One change I made recently is I made the compiler inline containers where possible, flattening the structure down a lot, simplifying it. So probably the story used to start with a container and now starts with glue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants