- Home /
Getting errors on my chart script
Hello unity! So in my Chartboost script i keep getting errors about "expected semicolon" "Unexpected Token" Etc. I read the documentation and copied everything from there but i do not know why im getting these errors. Here is my script like for example on the first line that says "using Chartboost;" it tells me to put semicolon for whoever knows the reason why. EDIT: Now Im getting a parsing error which i do not know what that means heres the updated script EDIT2: I fixed it
using UnityEngine;
using System.Collections;
using Chartboost;
public class Chart : MonoBehaviour {
void OnEnable() {
// Initialize the Chartboost plugin
// Replace these with your own Android app ID and signature from the Chartboost web portal
CBBinding.init("CB_APP_ID_ANDROID", "CB_APP_SIG_ANDROID");
}
void OnApplicationPause(bool paused) {
// Manage Chartboost plugin lifecycle
CBBinding.pause(paused);
}
void OnDisable() {
// Shut down the Chartboost plugin
CBBinding.destroy();
}
public void Update() {
if (Input.GetKeyUp(KeyCode.Escape)) {
if (CBBinding.onBackPressed())
return;
else
Application.Quit();
}
}
Answer by theUndeadEmo · May 30, 2014 at 12:28 PM
stick using XXXXX, outside the class
like this
using UnityEngine;
using System.Collections;
public class GUITest : MonoBehaviour {
void OnGUI () {
}
}
Cool im a update this now im getting a parsing error which i do not know what that means.
The second issue you are having may have to do with the fact that you are missing an extra ' } ' at the end of the code.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
MonoDevelope is not opening! 1 Answer
Updating bug, script crash, cant compile script 0 Answers
Robots Won't Spawn With Script 2 Answers
Nested Functions 1 Answer