Trying to read out of a website and wan't to store the value. Works perfect in Unity and Desktop Build. Any Ideas?

Error Code: FormatException: Input string was not in the correct format.

I got the string from the website and converted it to a float (theres just a single value on the website).
It works in Unity and in Desktop build, but just not on WebGL.

My Script:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class DataLoader : MonoBehaviour {

private int steps;
private string stepsString;
public int whileNumber = 1;
private float kilometers;
private float stepsFloat;

// Use this for initialization
IEnumerator Start () {
    while (whileNumber == 1)
        WWW databaseSteps = new WWW("");
        yield return databaseSteps;
        stepsString = databaseSteps.text;
        steps = int.Parse(stepsString);
        stepsFloat = steps;
        kilometers = stepsFloat * 0.62f / 1000;
        PlayerPrefs.SetFloat("kilometersTravelled", kilometers);
        yield return new WaitForSeconds(1);

// Update is called once per frame
void Update () {



FormatException: Input string was not in the correct format means that whatever value it read from the website, was NOT a float value, nor could it be made into one. Most likely cause would be an alpha result being sent from the web page.

Verify your URL you are using. The one in your code above returns a DNS error when I tried to hit it.

My best recommendation is to verify your URL, and before you try converting it into a float, throw in a debug log to show you what was received, so you can confirm you are actually receiving a number.

Hope this helps,