How do I pass file from AJAX to Json?

0 favourites
  • 3 posts
From the Asset Store
Assets for creating mountains and ravines environments
  • Hello,

    I'm trying to make a quiz game, and I used one block --> "On start of layout, Ajax request quiz.json (my file with the questions) with tag quiz" ; and a second block "Ajax on quiz completed, Json parse json string ajax.lastdata" .. The problem is that if I go in debug, the data from the file goes in Ajax.lastadata, but it doesn't go in the Json... can anybody help??

    Tagged:

  • There's likely a mistake in your JSON string (like a missing bracket), that's why it can't be parsed. If you press F12 and open browser console you will see an error message about it.

    I suggest you use any of the online JSON validator tools to fix the syntax.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • There's likely a mistake in your JSON string (like a missing bracket), that's why it can't be parsed. If you press F12 and open browser console you will see an error message about it.

    I suggest you use any of the online JSON validator tools to fix the syntax.

    thank you so much, that was actually the problem :)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)