Help with Tutorial "Online High Score Table"

Get help using Construct 2

Post » Tue Jan 20, 2015 5:41 am

Hey folks and first (as always) sorry for my english.

I want to make an Online High Score and i use this TUTORIAL.
But in the Final Game (i only exported the .capx from the tutorial to HTML), there's always an < / br > shown on the first line.

Also the getscores.php and the savescores.php shown an Database-Error.

I do everything from the Tutorial step by step an the username and password etc. for database are also correct (it still works to show the saved and save new entries but even with an < / br >).

I hope anyone can help :)

Thanks!
B
22
S
6
G
2
Posts: 185
Reputation: 3,632

Post » Wed Jan 21, 2015 12:52 am

Attache your capx let me see it.... I would also recommend doing all tests in a browser with just interacting with the php files... so not using the game just going directly too http://www.yoursite.com/savescores.php? ... core=15000

if this does not work and you don't get a success message then something wrong with your php file... in that case suggest attaching your php file I will look at it... simply delete your username and password...

things too look for - most DB require a prefix to the table... so if the table is score the db would be prefix_score so just ensure your details for the db are correct sounds to me if your getting db error... your username, password or combination of both are not right...
Need Sprites For Your Next Project?
100% Vector Animated Sprites
B
8
S
2
Posts: 170
Reputation: 1,086

Post » Wed Jan 21, 2015 9:35 am

I zipped the .capx and the .php files into the .zip i attached.
(and i deleted all the account-information in the .php as you say)
You do not have the required permissions to view the files attached to this post.
B
22
S
6
G
2
Posts: 185
Reputation: 3,632

Post » Wed Jan 21, 2015 3:13 pm

here upload this new php file to your server then tell me when thats done I have added error_reporting(E_ALL ^ (E_NOTICE | E_WARNING | E_DEPRECATED)); so that error reporting is dealt with accordingly - ideally this file should be re-created as mysql is deprecated.

either way your file was working ok when tested - update this file and let me check a few more things
Need Sprites For Your Next Project?
100% Vector Animated Sprites
B
8
S
2
Posts: 170
Reputation: 1,086

Post » Wed Jan 21, 2015 3:25 pm

opps didn't add files lol
You do not have the required permissions to view the files attached to this post.
Need Sprites For Your Next Project?
100% Vector Animated Sprites
B
8
S
2
Posts: 170
Reputation: 1,086

Post » Wed Jan 21, 2015 3:30 pm

ok looking at your capx file - your using foreach loops this tutorial is based on using the eachX var in a while loop....
Need Sprites For Your Next Project?
100% Vector Animated Sprites
B
8
S
2
Posts: 170
Reputation: 1,086

Post » Wed Jan 21, 2015 3:33 pm

your doArray should simply be checking that eachX is less then or equal to your TOTAL NUMBER OF requests - in this example your brining in 20 results 10 numbers and 10 names but since we count from 0 you would check that eachX less then or equal to - 19 (0-19 = 20 )

then set value of eachX -> toakenat(AJAX.LastData,everyx,"|")
Need Sprites For Your Next Project?
100% Vector Animated Sprites
B
8
S
2
Posts: 170
Reputation: 1,086

Post » Wed Jan 21, 2015 3:38 pm

I don't change anything at the .capx except the url to the .php files.
I will try your unpdated .php files ...

What do you mean exactly, desjardins2014? Please upload a .capx (sorry, i didn't understand everything)
B
22
S
6
G
2
Posts: 185
Reputation: 3,632

Post » Wed Jan 21, 2015 3:45 pm

Ha! With your changed .php files it works!
Thanks!
B
22
S
6
G
2
Posts: 185
Reputation: 3,632


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests