i am working on this script but I’m getting this error Assets/Basic Inventory.js(28,49): BCE0043: Unexpected token:
and the script is:
var InventPicOnOff : boolean;
var InventPicture : Texture;
var x : int;
var y : int;
var w : int;
var z : int;
function Start ()
{
InventPicOnOff = false;
}
function Update ()
{
if(Input.GetKeyDown(KeyCode.E)) {
InventPIcOnOff = true;
}
if(Input.GetKeyUp(KeyCode.E)) {
InventPicOnOff = false;
}
}
function OnGUI ()
{
if(InventPicOnOff == true) {
GUI.DrawTexture(Rect(x, y, w, z,),InventPicture);
}
}
how do i fix this.