this probably seems like a noob question, but i forgot where the brackets go lol and now i have errors and i cant remember, heres my script
var weapon = 0;
function Update () {
}
function OnGUI () {
if (GUI.Button (Rect (10,10,160,100), "Machineguns")) {
(var weapon == 1);
}
if (GUI.Button (Rect (10,170,330,100), "Flamethrower")) {
(var weapon == 2);
}
if (GUI.Button (Rect (10,330,490,100), "Cannon")) {
(var weapon == 3);
}
}
the brackets on the var weapon == 1;
– sam32x