- Home /
MySql C# compiler error
So I have the following code
using UnityEngine;
using System.Collections;
using MySql.Data.MySqlClient;
public class NewBehaviourScript : MonoBehaviour {
// Use this for initialization
void Start () {
string server = "localhost";
string database = "mysqldatabase1";
string uid = "username";
string password = "password";
string connectionString;
connectionString = "SERVER=" + server + ";" + "DATABASE=" +
database + ";" + "UID=" + uid + ";" + "PASSWORD=" + password + ";";
MySqlConnection connection = new MySqlConnection(connectionString);
}
}
When I compile the project it does not give any errors of warnings. However when I try to run the game I get the: "All compiler errors have to be fixed before you can enter play mode."
I have tested a bit and found out that the problem occurs when I add the using MySql.Data.MySqlClient; line.
Any ideas why this happens? Thanks in advance.
Comment
Your answer
Follow this Question
Related Questions
Saving a leaderboard using PHP and C#. 2 Answers
What Method is better for Creating a Guild 1 Answer
Unity MySQL Database? 0 Answers
Problem in starting mysqld Process 0 Answers
Unity5 to connect mySQL data base using C# - I need help 2 Answers