Whats Going on Here?(script needing fixed)

Author Topic: Whats Going on Here?(script needing fixed)  (Read 1121 times)

Tom

I get an error when the script complies. Look at pic.
Code: [Select]
$ShopItemStack = new ScriptObject(){class = ShopItemStackSO;count = 0;};
$NewItemName

function serverCmdNewShopItem(%client, $NewItemName){

   $ShopItemStack.addValue($NewItemName)
   messageClient(%client, "", $NewItemName, "Has been added to the shop item list");
}

function serverCmdSeeShopItems(%client,){
   $ShopItemStack.dumpStack();
}

Bold is fixed errors. Italics is other fixes which will help.
Quote
if(!isObject($ShopItemStack))
{
 $ShopItemStack = new ScriptObject(){class = ShopItemStackSO;count = 0;};
}
//Removed a glitchy random variable name

function serverCmdNewShopItem(%client, %newname){

   $ShopItemStack.addValue(%newname)
   messageClient(%client, "", %newname @ "Has been added to the shop item list");
}

function serverCmdSeeShopItems(%client){ //Removed a glitchy comma
   $ShopItemStack.dumpStack();
}

Bold is fixed errors. Italics is other fixes which will help.
Quote
if(!isObject($ShopItemStack))
{
 $ShopItemStack = new ScriptObject(){class = ShopItemStackSO;count = 0;};
}
//Removed a glitchy random variable name

function serverCmdNewShopItem(%client, %newname){

   $ShopItemStack.addValue(%newname);
   messageClient(%client, "", %newname @ "Has been added to the shop item list");
}

function serverCmdSeeShopItems(%client){ //Removed a glitchy comma
   $ShopItemStack.dumpStack();
}

What was the point in that?

He added a semicolon.


Tom

Yeah it i found the missing semicolon myself after about 3 trys.