Arrays don't work when uploaded to bitballoon

Discussion and feedback on Construct 2

Post » Sun Jan 08, 2017 4:55 am

So I made a program, works fine when I test it myself but when I uploaded it to bitballoon it stopped working correctly. To double check what the problem was I made a textbox that shows one of the values in an array that the user creates and sure enough after tying in the value nothing came up so it seems like arrays aren't functioning properly when uploaded with this site. Is there anyway to fix that? I've been exporting as an HTML file and then converting it to a zip file that I upload to the site, everything else seems to work fine
B
22
S
8
Posts: 203
Reputation: 2,059

Post » Sun Jan 08, 2017 7:02 am

Check the font size inside the text box. You might have it not set to auto, so smaller window sizes will cause the font to be too large to be displayed. You can also use the browser log action to display the asjson of the array, just to confirm that it's correct, and to display the text box.text value.
I only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
73
S
19
G
66
Posts: 2,198
Reputation: 42,188

Post » Sun Jan 08, 2017 11:15 am

I've used bitballoon to host many games and not had any problem with arrays, which I use often. I don't zip the files though - maybe that's part of the problem?
B
16
S
7
G
3
Posts: 395
Reputation: 3,693

Post » Sun Jan 08, 2017 1:07 pm

Colludium wrote:Check the font size inside the text box. You might have it not set to auto, so smaller window sizes will cause the font to be too large to be displayed. You can also use the browser log action to display the asjson of the array, just to confirm that it's correct, and to display the text box.text value.


I don't believe its the font size because instead of displaying nothing it displays 0 but I will try checking the browser log and check the rray
B
22
S
8
Posts: 203
Reputation: 2,059

Post » Sun Jan 08, 2017 1:47 pm

Ok so I tried checking the array using the console and it looks like the values just aren't being saved. I set the value of the array to A but the console displayed 0.

Just to see if I could reproduce the error I made a program with just a textbox, array, text, and a button. When the user pushes the button the value in the textbox is put into the array and displayed on screen. This worked totally fine so there must be something else wrong with my coding although I have no idea what it is
B
22
S
8
Posts: 203
Reputation: 2,059

Post » Sun Jan 08, 2017 2:23 pm

I think I fixed the issue, I've been using local storage and an integer variable was being turned into a string which was causing errors
B
22
S
8
Posts: 203
Reputation: 2,059

Post » Sun Jan 08, 2017 2:47 pm

Great news that you've identified and fixed the problem.
I only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
73
S
19
G
66
Posts: 2,198
Reputation: 42,188


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 5 guests