(Solved) It works on the localhost but not on the server?

0 favourites
  • 4 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • SOLVED!

    Hello!

    This is my first post on this forum, and I am really new to Construct. Please bear with me.

    I am working on a card game project, and the problem I am having currently (among others) is that some events that work like a charm on the debugging testrun for some reason don't work once I export and upload the project to my server.

    What could be a possible reason for this?

    Here's how my event code looks (I scribbled over the unimportant/working parts:

    I have Layer0 which is the game board, Layer1 which is a grey overlay for the game board when a card is magnified, and Layer2 which displays a closeup of the card. On the live server, Layer2 does not get displayed for whatever reason...

    Thanks in advance for your answers!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There really is not enough info to go on, unfotunately. Without either a .capx or at least a link to the exported version on your server, then it is just basically shooting in the dark.

    Having said that, what browsers have you tested it on?

    What errors (if any) are shown in the browser console?

    Have you tried running it from a different host?

  • I'm using Google Chrome. I just checked the error log and it says this:

    [quote:3rph111e] Image from origin 'http://www.bplaced.net' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://brainstest.bplaced.net' is therefore not allowed access.

    Could this be the cause of the issue? If yes, how can I fix this?

    I haven't yet tried using a different host.

    It's weird by the way because the other images that I am loading the same way load without a problem.

  • Update: Okay, so I'm not sure what I did or how I did it, but I just moved a text output to a different position in the script and for some reason that fixed two problems at once.

    Thank you for trying to help me nevertheless!

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