Highscore with Dreamlo

Hello dear Unity Community

I’m new to coding and Unity and in need of your expertise.

I’m trying to get a highscore leaderboard for my “fall & catch” game. Right now I have a working game, that shows the score in a GUI. The Score is visible throughout all of the scenes and also in the game over view.

I’ve found Dreamlo (http://dreamlo.com/) but I don’t have any idea, how I can implement my score/points to this script. Like I said, I’m an absolute newbie and I’ve tried to get it with this tutorial ([Unity Tutorial] Online Highscores 01 (dreamlo) — Video | VK) but the lack of knowledge drives me crazy.

I’m using this script to receive the player score:

#pragma strict

var points:int = 0;
var anzeige:UnityEngine.UI.Text;

function Update () {
	anzeige.text = points + '';

}

… but how can I implement the points (score) to Dreamlo? Well that’s the big question.

I’m already thank you for your time and appreciate your help!

so i have edited minor things to you & you don’t need to look @ the whole script just look @ my 5 comments inside the script & sorry it’s in c# :

using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class Dreamlo : MonoBehaviour {
int points = 85;//add this value to AddNewHighscore function
string user = "FIVESIGN";//& this you can replace it with string from input field

public Text anzeige;

const string privateCode = "8emSDmwcGkS8-Jtzi27sCQQLT30aNynE-PUTK1w2B-0g";
const string publicCode = "572658d06e51b60644e2625c";
const string webURL = "http://dreamlo.com/lb/";

public Highscore[] highscoresList;

void Awake (){
    //call this function to upload & put your variables inside braces 
	AddNewHighscore (user,points);
	DownloadHighscores();// & this to download
}

public void AddNewHighscore(string username, int score) {
	StartCoroutine(UploadNewHighscore(username,score));
}
IEnumerator UploadNewHighscore(string username, int score) {
	WWW www = new WWW (webURL + privateCode + "/add/" + WWW.EscapeURL (username) + "/" + score);
	yield return www;

	if (string.IsNullOrEmpty (www.error))
		print ("Upload Successful");
	else {
		print ("Error uploading: " + www.error);
	}
}
	 
public void DownloadHighscores() {
	StartCoroutine("DownloadHighscoresFromDatabase");
}

IEnumerator DownloadHighscoresFromDatabase() {
	WWW www = new WWW(webURL + publicCode + "/pipe/");
	yield return www;

	if (string.IsNullOrEmpty (www.error)) {
		FormatHighscores(www.text);

	}
	else {
		print ("Error Downloading: " + www.error);
	}
}

void FormatHighscores(string textStream) {
	string[] entries = textStream.Split(new char[] {'

'}, System.StringSplitOptions.RemoveEmptyEntries);
highscoresList = new Highscore[entries.Length];

	for (int i = 0; i <entries.Length; i ++) {
		string[] entryInfo = entries*.Split(new char[] {'|'});*
  •   	string username = entryInfo[0];*
    
  •   	int score = int.Parse(entryInfo[1]);*
    

_ highscoresList = new Highscore(username,score);_
print (highscoresList_.username + ": " + highscoresList*.score);
//this line will change the ui text*

anzeige.text = (highscoresList .username + ": " + highscoresList .score);
* }
}
}
public struct Highscore {
public string username;
public int score;_

public Highscore(string username, int score) {
username = username;
score = score;*
* }*

}

Hi guys, been struggling for days with this dreamlo leaderbord and can’t get it to work , can you please take a look at my code ? any kind of help will be awesome ! ,
thank you in advance!

using UnityEngine;
using System.Collections;

public class Highscores : MonoBehaviour {

	const string privateCode = "";
	const string publicCode = "";
	const string webURL = "http://dreamlo.com/lb/";

	DisplayHighscores highscoreDisplay;
	public Highscore[] highscoresList;
	static Highscores instance;
	int score;
	string username;

	void Awake() {

		int score = GetComponent<GController> ().highscore;
		string username = GetComponent<InputName>().username;

		Highscores.AddNewHighscore (username, score);


		highscoreDisplay = GetComponent<DisplayHighscores> ();
		instance = this;
	}

Sebastian Lague has created tutorial videos on how to implement dreamlo into a Unity game.

What about replacing a score with a lower one not a higher score for the quickest time for ecample