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

Get help using Construct 2

Post » Mon Dec 08, 2014 11:05 am

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:
Image
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!
Last edited by artyrambles on Mon Dec 08, 2014 11:32 am, edited 1 time in total.
B
3
Posts: 3
Reputation: 181

Post » Mon Dec 08, 2014 11:14 am

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?
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
86
Posts: 5,415
Reputation: 59,516

Post » Mon Dec 08, 2014 11:26 am

I'm using Google Chrome. I just checked the error log and it says this:
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.
B
3
Posts: 3
Reputation: 181

Post » Mon Dec 08, 2014 11:32 am

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!
B
3
Posts: 3
Reputation: 181


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 11 guests