Error: Incorrect number of arguments. Expected no more than 5. in nexusShopNexusShopPopupView.as(47): col: 115

Error: Incorrect number of arguments. Expected no more than 5. in nexusShopNexusShopPopupView.as(47): col: 115



I want to build a swf file for this I am using FlashDevelop the Flex SDK 4.6 this worked, until I started to get this error: " Error: Incorrect number of arguments. Expected no more than 5. in nexusShopNexusShopPopupView.as(47): col: 115" I would love some advice. Thank you.


public class NexusShopPopupView extends ModalPopup


public static const TITLE:String = "Purchase";
public static const WIDTH:int = 300;
public static const HEIGHT:int = 170;

private var availableInventoryNumber:int;
private var owner_:SellableObject;
public var buyItem:Signal;
public var buttonWidth:int;
public var descriptionLabel:UILabel;
public var itemLabel:UILabel;
private var quantity_:int = 1;
private var buySectionContainer:Sprite;
public var buyButton:ShopBuyButton;
public var spinner:FixedNumbersSpinner;
private var buyButtonBackground:SliceScalingBitmap;

public function NexusShopPopupView(_arg_1:Signal, _arg_2:SellableObject, _arg_3:Number, _arg_4:int)

super(WIDTH, HEIGHT, TITLE, DefaultLabelFormat.defaultSmallPopupTitle, new Rectangle(0, 0, 525, 230), 0);
this.buyItem = _arg_1;
this.owner_ = _arg_2;
this.buttonWidth = _arg_3;
this.availableInventoryNumber = _arg_4;
this.descriptionLabel = new UILabel();
DefaultLabelFormat.infoTooltipText(this.descriptionLabel, 0x999999);
this.descriptionLabel.text = "Are you sure that you want to buy this item?";
addChild(this.descriptionLabel);
this.descriptionLabel.x = ((WIDTH / 2) - (this.descriptionLabel.width / 2));
this.descriptionLabel.y = 10;
this.addItemContainer();
this.addBuyButton();
this.filters = FilterUtil.getStandardDropShadowFilter();


private function addItemContainer():void

var _local_1:ItemWithTooltip;
if (this.owner_.getSellableType() != -1)

_local_1 = new ItemWithTooltip(this.owner_.getSellableType(), 80);
;
_local_1.x = ((WIDTH / 2) - (_local_1.width / 2));
_local_1.y = (((HEIGHT / 2) - _local_1.height) + 5);
addChild(_local_1);
this.itemLabel = new UILabel();
DefaultLabelFormat.petYardUpgradeRarityInfo(this.itemLabel);
this.itemLabel.text = this.owner_.soldObjectName();
addChild(this.itemLabel);
this.itemLabel.x = ((WIDTH / 2) - (this.itemLabel.width / 2));
this.itemLabel.y = (_local_1.y + 55);


private function addBuyButton():void

var _local_2:int;
this.buySectionContainer = new Sprite();
this.buySectionContainer.alpha = 1;
this.buyButton = new ShopBuyButton(this.owner_.price_, this.owner_.currency_);
this.buyButton.width = 95;
this.buyButtonBackground = TextureParser.instance.getSliceScalingBitmap("UI", "buy_button_background", (this.buyButton.width + 60));
var _local_1:Vector.<int> = new Vector.<int>();
if (this.availableInventoryNumber != 0)

_local_2 = 1;
while (_local_2 <= this.availableInventoryNumber)

_local_1.push(_local_2);
_local_2++;
;

else

_local_1.push(1);
this.buyButton.disabled = true;
;
this.spinner = new FixedNumbersSpinner(TextureParser.instance.getSliceScalingBitmap("UI", "spinner_up_arrow"), 0, _local_1, "x");
this.buySectionContainer.addChild(this.buyButtonBackground);
this.buySectionContainer.addChild(this.spinner);
this.buySectionContainer.addChild(this.buyButton);
this.buySectionContainer.x = 100;
this.buySectionContainer.y = (HEIGHT - 45);
this.buyButton.x = ((this.buyButtonBackground.width - this.buyButton.width) - 6);
this.buyButton.y = 4;
this.spinner.y = -2;
this.spinner.x = 32;
addChild(this.buySectionContainer);
this.buySectionContainer.x = Math.round(((WIDTH - this.buySectionContainer.width) / 2));
this.spinner.upArrow.addEventListener(MouseEvent.CLICK, this.countUp);
this.spinner.downArrow.addEventListener(MouseEvent.CLICK, this.countDown);
this.refreshArrowDisable();


private function refreshArrowDisable():void

this.spinner.downArrow.alpha = ((this.quantity_ == 1) ? 0.5 : 1);
if (this.availableInventoryNumber != 0)

this.spinner.upArrow.alpha = ((this.quantity_ == this.availableInventoryNumber) ? 0.5 : 1);

else

this.spinner.upArrow.alpha = 0.5;
;


private function countUp(_arg_1:MouseEvent):void

if (this.quantity_ < this.availableInventoryNumber)

this.quantity_ = (this.quantity_ + 1);
;
this.refreshValues();


private function countDown(_arg_1:MouseEvent):void

if (this.quantity_ > 1)

this.quantity_ = (this.quantity_ - 1);
;
this.refreshValues();


private function refreshValues():void

this.refreshArrowDisable();
this.buyButton.price = (this.owner_.price_ * this.quantity_);


public function get getBuyButton():ShopBuyButton

return (this.buyButton);


public function get getBuyItem():Signal

return (this.buyItem);


public function get getOwner():SellableObject

return (this.owner_);


public function get getQuantity():int

return (this.quantity_);






}//package io.decagames.rotmg.nexusShop




1 Answer
1



The problem is not with this class you have shared, it is happening somewhere you are using and instantiating it. see the constructor:


NexusShopPopupView(_arg_1:Signal, _arg_2:SellableObject, _arg_3:Number, _arg_4:int)



It gets 4 input parameters. Somewhere in your code instantiating this class you are passing incorrect number of parameters to the constructor.



Thanks for contributing an answer to Stack Overflow!



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown




By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)