AnD4D's Recent Forum Activity

  • I would try urlencode first - it converts commas, &, ?, and all the other symbols to codes that cause trouble in URLs. then urldecode converts them back.

    This has worked perfectly AllanR

    I'm tempted to try the encryption at some point as well, but I'll keep it in my back pocket for a while!

    Thank you so much for your help!

  • Have you tried setting the "Content-Type" header to "application/json" before making the request?

    If you are not doing that, then it must be trying to send as plain text, and then you need to escape certain special characters. But I am just vaguely recalling all of this, so it might not be accurate.

    It seems to have a problem submitting commas. It posts the word just after the comma, then stops. I'll try the ecryption approach. Kinda makes sense for stored data to be encrypted anyway. Hopefully Construct gets an official plugin soon.

    have you tried "urlencode" before sending the text? you will then need to urldecode in php on the other end.

    I have not. I will do that if the encryption plugin fails :D

  • No, but I will try that asap and then get back to you!

  • Hey DiegoM

    As an example, it's basically a series of JSON codes embedded into a single JSON.

    {"c2dictionary":true,"data":{"MiniWidth":480,"MiniHeight":280,"MiniX":1440,"MiniY":800,"ModData":"{\"c2dictionary\":true,\"data\":{\"and4d\":0,\"challacc\":0}}","GiveawayData":"{\"c2dictionary\":true,\"data\":{\"MaxEntries\":100,\"Word\":\"! \"}}","CounterData":"{\"c2array\":true,\"size\":[0,2,1],\"data\":[]}","StoreData":"{\"c2array\":true!comma!\"size\":[1!comma!3!comma!1]!comma!\"data\":[[[\"Scribble \"]!comma![\"ScribblePlus\"]!comma![\"50\"]]]}"}}

    This is then uploaded via AJAX, calling a php file which stores it into a database.

    If any section of the data includes a comma, it breaks the json (which makes sense), yet if I use certain symbols it breaks the upload, and it never reaches the database.

    I'm currently in the process of testing an encryption plugin, but I always hate using non-official plugins in Construct 3.

  • I note that whenever I submit an AJAX to website (to store data, such as leaderboards) there are occasions where I was unable to actually upload anything.

    I asked this question over a year ago to a deadly silence, but hopefully someone can help out this time...

    https://www.construct.net/en/forum/construct-2/general-discussion-17/ajax-post-limit-143358

    After some investigation, it seems that the problems come when I post anything that includes a symbol, such as & or #. This blocks the upload of data entirely!

    I'm able to get around this by using the replace action, that replaces the symbols with words. For example, # becomes !hash! and & becomes !and! (apparently ! is not an issue).

    However, I'm worried that I will end up missing a symbol somewhere along the line, especially with there being dozens of them.

    Can anyone think of a clever way of encrypting the data that's uploaded (that is ajax/php safe) then decrypting it when Construct downloads it again?

  • Due to the way Twitch secures things, it doesn't like one site talking to another, which means any program that is hosted in the cloud can't get certain info. If I made a local version, I'd be able to grab that data without issue.

    The work around I found is that most local chatbots will post a message, such as "Thanks for the 10 bits!" into the chat. So my cloud bot will scan for such a sentence, then can trigger events based on seeing that message appear.

    Unless I misunderstood what you meant.

  • I stream from time to time, but not to do it as a job. I do it to meet people and test out the code, primarily :D

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You stream russpuppy?

    If you want to try it out, you can check out what it can do by visiting https://www.challacc.com

  • I was trying to share the code for quite a while, but it had the word "TwitchCraft" in the title, and Scirra kept rejecting it because the word Twitch is copyrighted, even though that's not how copyright laws work XD

  • Hi russpuppy

    Yes, I'm able to get all of that working. It's pretty insane what I've been able to achieve slapping Construct and Twitch together :D

    The fact we can now make Twitch extensions just opens up so many more doors when combined with the multiplayer plugin :)

  • The debugger pause button should work. If it doesn't work, please file a bug report following all the guidelines - we need all that information to help, I can't debug a video.

    Will do Ashley sorry about that. Found out that it's the multiplayer plugin in C3 that's causing the bug, so I'll file the report asap.

  • Ashley Sorry to tag you again on this project, but I think this might actually be a bug with the program. I'd post it, but sadly I'm unable to actually replicate the bug with a smaller project.

    However, based on the fact it's refusing to pause, which should be beyond what I'm able to affect, I'm pretty certain this is not a bug with my code.

    Subscribe to Construct videos now

    The video above shows what I mean. Time and ticks continue, even when the debugger is paused.

AnD4D's avatar

AnD4D

Member since 4 Nov, 2011

Twitter
AnD4D has 3 followers

Connect with AnD4D

Trophy Case

  • 13-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies