can someone tell me whats the problem with this my script.

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.

When you make “InventPlcOnOff = true”, near the beginning of Update, you have a typo. You’ve written “Plc” instead of “Pic”.