brunopf's Forum Posts

  • 6 posts
  • Hello,

    I am developing an educational game which consists in both the game and a web platform for the teachers to register new questions and have feedback from the students.

    I am trying to send the data from the in-game (user registering form) to the rails application using JSON & AJAX. My problem is that rails needs the post request with the content-type headers as JSON, which is not possible natively in construct 2.

    Is there any alternative AJAX plugin that let me change the headers content? Any other solution?

    I appreciate any help.

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have found my error which was in the sintax of the dictionary c2 uses. :)

  • I still struggle with the Json.

    Any suggestions of how the actions should be like, or maybe the json string has something wrong?

  • Thanks for the help Anata.

    I added the keys to the dictionary at the start of the layout but I still can't load the json in it. <img src="smileys/smiley19.gif" border="0" align="middle" />

  • Hello y'all,

    I am having problems to load into the dictionary a json returned from a php page.

    I have already checked the cross-domain header on the php. The PHP is working fine and I'm storing the Ajax.LastData into a variable which is displayed in the debug having the following value:{"id":"2","pergunta":"2*2","resposta":"4"}

    This same value is not loading when i call the Load on the dictionary.

    The php content-type is also set to application/json.

    What am I missing?

  • When you zip the folder of your game do not zip phonegap.js , and send it again to phonegap.

    It worked for me.

  • 6 posts