# Incorrect # of args

**URL:** <https://forum.kirupa.com/t/incorrect-of-args/306220>\
**Category:** flash\
**Created:** [March 11, 2010, 10:12am UTC](https://forum.kirupa.com/t/incorrect-of-args/306220 "2010-03-11T10:12:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Atroxe](https://avatars.discourse-cdn.com/v4/letter/a/f1d935/32.png) [@Atroxe](https://forum.kirupa.com/u/Atroxe)\
**Post date:** [March 11, 2010, 10:12am UTC](https://forum.kirupa.com/t/incorrect-of-args/306220/1 "2010-03-11T10:12:41Z")

</div>

So, I’ve come across 2 problems I’m unable to solve by myself.

The first one is from a project in which my aim is to develop an RPG game engine, right?

So I’ve been working on a system handling inventory, since you’re supposed to handle things in a game, else the game would suck.

So the current functionality is that I’ve got the Inventory-script, handling stuff like hiding/showing the backpack, adding and removing stuff from it etc.

Plus I’ve got the “coolSword” item and class to symbolize an item, and the “Backpack” item and class to solidify a backpack. Some of this will get switched out to more dynamc counterparts during development, but that isn’t very relevant at the time being.

My problem is the following:

I have got a function that, when a certain key is pressed, puts a backpack on the stage, “openBackpack”.

I have also got a function which removes a sword thumbnail from the stage, add’s a sword thumbnail to the backpack-mc, and all of this i working great.

The only problem being that when i fire my thumbnail-function, I want it to remove thumbnail from the stage, add it to the Backpack and then call the openBackpack-function. Though when I add “openBackpack” I return;

1136: Incorrect number of arguments. Expected 1.
