I also need help with the same problem that Swiff has.
Any help is much appreciated :)
Thanks
Printable View
I also need help with the same problem that Swiff has.
Any help is much appreciated :)
Thanks
I know that this may be a little late, but the solution I use to only allowing a user to upload one score and have it update their previous score if they get a new one (not using the name identification method, since more than one user might enter the same name) may help someone else out here. It requires a little bit more knowledge on php and how database tables work though, but there are plenty of php and SQL tutorials out there, so if you search, you should be able to find one!
In the game's .ini file, have a "playerID" variable. When they go to submit a high score, have the game check that variable. If it doesn't have a value, that means this user hasn't submitted a high score before. In this case (this is the part where php scripting knowledge comes in handy), have the script pull up the online high scores table sorted by the playerID (you'll have to add this column when creating the database), get the highest playerID and add 1 to it, and write the player's score to a new line in the table, including that new incremented playerID number. Remember to also write that new playerID number to the local .ini file, so that it can be referenced in the future! Then you'll re-sort the table by scores (highest to lowest) and show the top scores. Since the playerID is generated on the server and incremented each time someone new submits a high score, each player will have a unique playerID!
When someone with an existing playerID (written in their .ini file) submits a high score, you'll just tell the php script to locate the entry with that unique playerID, and overwrite those scores (if they're better). Voilà!
I know it's easier said than done, and I wish I had time to write a tutorial about the php side of things, but again, a quick search on the internet for tutorials returns a plethora of resources. (It's how I got to where I am today!)
I hope this helps someone out! :)
I am currently writing a new tutorial, with a different way of doing a high scores, which has those features in it. and is a lot easier to use as well :)
Along with 2 easy scripts.
Thank you crjMosh...
I found a solution via a php site
we must work on a php file: score_script.php and a phpadmin where is the database
change to unique in the index of playername in phpadmin page
Attachment 17514
And change the script in the score_script.php fil like this
Attachment 17515
That's all... it works fine
Anybody can help me please? I was able to done everything online score but the original score shown on the scoreboard is too high, i need to reset or delete the data through somewhere, i readed this forum and says delete the myphpadmin that part, i delete them all by clicking the "x" if im not wrong, then I open the scoreboard in the game it shown something weirld(shown at bottom) , I'd login back into myphpadmin but I don't understand anything I can't fix it... :( please help me...
here's what wrong... soemthing weirld.. after i done something at myphpadmin.
Attachment 17606
confused me... what the beep is this on myphpadmin.. if anyone can teach I'm appreaciate it
Attachment 17607
Problem solved, just browse the database your 123456_scores at myphpadmin> edit> change to 0.
alternative method, chg score with mmf/cf. thanks to sparckman, need some time to learn though:
https://www.youtube.com/watch?v=7qWg67FZQGo
I got this error message:
"No route to host" - I tried for hours to solve it, with no success.
Anyone know what it means?
I just get an error message:
No route to host
Anyone knows whats wrong, and / or how it can be fixed?
Show the events / scripts... you probably did something wrong or there is something with the host
Bonjour ,
Après plusieurs tentatives donnant des trucs bizarres ,j'aimerai savoir comment modifier le code de Sparckman pour rajouter une colonne supplémentaire intitulé " VILLE " .
Merci
Hello, I need some help because i don't know where to change the code in order to add a " City " column.
Thanks in advance
This is brilliant tutorial, but I'm running into a problem and I don't know how to rectify.
If I do the check to see if the server is online, I get the following error message:
http://peanutbutterfingers.netai.net...hp?status=true <== go to that link to see error.
When creating the database it gives me the following information:
(password is definately "flappy")Quote:
a7026219_flappy a7026219_flappy mysql13.000webhost.com
in the config script I have the following information:
If I run the MFA it reports server offline, and if I run the script in the browser I get:PHP Code:// Your host -- for example localhost or mysql.server.com
$mysql_host = "mysql13.000webhost.com";
// Your user name for mySQL
$mysql_user = "a7026219_flappy";
// Your password for mySQL
$mysql_password = "flappy";
// Your database name for mySQL
$mysql_database = "a7026219_flappy";
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'a7026219_flappy'@'10.1.1.39' (using password: YES) in /home/a7026219/public_html/score_script.php on line 20
Free Web Hosting
Access denied for user 'a7026219_flappy'@'10.1.1.39' (using password: YES)
Any Help would be greatly appreciated.
Password for the DB isn't the one for the actual hosting site ;)
I have error
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'a2647550_5687'@'10.1.1.31' (using password: YES) in /home/a2647550/public_html/sparck_score.php on line 14
Free Web Hosting
Access denied for user 'a2647550_5687'@'10.1.1.31' (using password: YES)
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'a2647550_5687'@'10.1.1.31' (using password: YES) in /home/a2647550/public_html/sparck_score.php on line 14
Free Web Hosting
Access denied for user 'a2647550_5687'@'10.1.1.31' (using password: YES)
I'm trying online score system. However I got a same error message @GamesMania
What I needs more action?
Thanks!Attachment 20054
Hello.
Thank you for the script.
But I can't use next words in mobile_save_score.
"+" "#" "&"
and when "0" is first.
If I use these words when I submit the score, the score list crashes.
How can I fix this?
Hello.
Thank you for the script.
But I can't use next words in mobile_save_score.
"+" "#" "&"
and when "0" is first.
If I use these words when I submit the score, the score list crashes.
How can I fix this?
Attachment 21478
D:<
Same errors! any other tutorials for making this? I tried a lot of webhostings and I can´t make it works :S! maybe the script doesnt work?
This still works, since i am using part if it as well.
1. Make sure you have access to the SQL on the host
2. Free hosts now these days won't work anymore as good anymore. Get a paid one for hosting your website.
I can confirm that this script works perfectly. I'm using it on all my online games with computers and tablets and it works perfectly on both.
Does anyone know how I could call on a specific row of data from the score database? In this tutorial it shows the full top 10 scores table and just lists them as individual pieces (ex: player names on the leaderboard being 1, 4, 7 using the string parser). What I wanted to be able to do was just pull a specific player's name, score and date as opposed to the whole leaderboard. So say for example, Doug is in 7th place with a score 150, I'd like to be able to click a button that just brings up that row of data ("Doug, 150 points, April 10"). How would I go about doing that in the game from working off of this tutorial?
Get the scores locally.
Save the score also local on the device.
Perry, I can't get it to work, I've tried to port it to newer mysql, everything works except inserting new data
I gives this error:
<br /> <b>Notice</b>: Undefined index: status in <b>/home/u202521961/domains/teste.com/public_html/score_script.php</b> on line <b>74</b><br />
check whats on line 74 compared to your schema for that table.
Do you still have the issue?
You need to make sure the Table and column exists.
I re-wrote his scripts and added auto create the table and columns in it. with the original script you need to have that done manually.
i get this text
after i upload the score_script.php and config.php to the public html folder and try to access https://hot-short-notation.000webhos...ore_script.php . Please help :)Quote:
$_GET["code"]) { // Something is wrong -- MD5 security hash is different // Could be someone trying to insert bogus score data exit; } // Everything is cool -- Insert the data into the database $query = "insert into $tname(gameid,playername,score,scoredate,md5) values ('$gameid_safe','$playername_safe','$score_safe',' $date','$security_md5')"; $insert_the_data = mysql_query($query)or die(mysql_error()); } /////////////////////////////////////////////////////// // List high score /////////////////////////////////////////////////////// // Return a list of high scores with "|" as the delimiter if ($gameid_safe) { $query = "select * from $tname where gameid='$gameid_safe' order by score desc limit 10"; $view_data = mysql_query($query)or die(mysql_error()); while($row_data = mysql_fetch_array($view_data)) { print($row_data["playername"]); print "|"; print ($row_data["score"]); print ("|"); print($row_data["scoredate"]); print("|"); } // We limit the score database to hold the number defined in the config script // First check to see how many records we have for this game $query1 ="select * from $tname where gameid = '$gameid_safe'"; $countresults = mysql_query($query1)or die(mysql_error()); $countofdeletes = mysql_num_rows($countresults); if (mysql_num_rows($countresults)>$score_number) { $query2 ="SELECT * FROM $tname WHERE gameid = '$gameid_safe' ORDER BY score DESC Limit $score_number,$countofdeletes"; $Get_data = mysql_query($query2)or die (mysql_error()); while($row_data = mysql_fetch_array($Get_data)) { $id_delete = $row_data["id"]; $query3 = "Delete from $tname where id = $id_delete"; $Delete_data = mysql_query($query3)or die (mysql_error()); } } } ?>
check your secret kays are the same in both the php and your game
also check your host allows .php files
I'm getting the same issue, I'm using 000webhost. No matter what I do score_script.php always results in the same as NikiN gets. Have checked everything many times.
I opened a new database at InfinityFree, and putting the script file on the free domain I got through it now gives me the "online" text instead of the previous mess, but I still make the Clickteam example work. The initial 10 scores have appeared to the database, but I can't connect to it from Fusion.
Guess I will have to try a paid host.
This is no longer valid because mentioned hosting website plus almost all of them are closed to outgoing connections and all are part of paid services... Tell me if you find some free services
www.altervista.org
free web hosting with php. I use this!!!
Well, I have a paid host for years, and it looks like it broke my scripts... at least, scores are not submitted anymore. Started since Feb 2019, not sure what it going on. but I contacted my host, wondering if something got changed in their MySQL server.
Seems like my host doesn't allow remote sessions for maintaining my Database... so i am not sure if that is related..
Hopefully, it's something in the code that needs to be changed or they messed something up at their end.
It all seems to be a connection issue now.
Hello ,
has anyone found a solution to this ? I can't get the online high score tutorial to work , and I can't either get the online score kit from the clickstore to work either.
Hello n just wanted to let you know that the onlinescore starter kit on clickstore actually works ; I had put special characters in my database password that caused connection issues.
Also , although I must make it clear first that I have no knowledge in php / mysql , it seems that connection issues with jeff's tutorial could be due to the fact that starting with php 7 , mysql requests had to be changed to mysqli ( i for improved) so that if your provider has set your databases to php 7 , jeff's initial script could be outdated.
in the click store ( I don't mean to advertize here, since I paid for the starter kit and I'm not affiliated with it) , the starter kit offers a script with mysqli. What I said above could be false, but the starter kits's scripts work for me, for now.