Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

Party System: number is not a function

Status
Not open for further replies.

cward3223

Villager
Xy$
0.00
EDIT: I have tried also disabling the party system plugin and it still produces the same error.

I am using Yanfly Party system, although I do not think that is what is causing the error I just wanted to clarify.

The way I want my game to work is I will only have 4 followers and 4 battle members, but using the Yanfly Party system a player should be able to switch between active and inactive party members.

The problem, as soon as the 5th character is added to the party (whom does not show as a follower) and I hit 'ESC' to bring up the menu I get the error "number is not a function"

I have pulled up the console and here is the entire error

Code:
TypeError: number is not a function
  at Window_MenuCommand.isFormationEnabled (rpg_windows.js:1660)
  at Window_MenuCommand.addFormationCommand (rpg_windows.js:1607)
  at Window_MenuCommand.makeCommandList (rpg_windows.js:1582)
  at Window_MenuCommand.Window_Command.initialize (rpg_windows.js:1295)
  at Window_MenuCommand.initialize (rpg_windows.js:1562)
  at new Window_MenuCommand (rpg_windows.js:1555)
  at Scene_Menu.createCommandWindow (rpg_scenes.js:780)
  at Scene_Menu.create (rpg_scenes.js:769)
  at Function.SceneManager.changeScene (rpg_managers.js:1654)
  at Function.SceneManager.updateMain (rpg_managers.js:1640)
None of these seem to be coming from the Yanfly Party System plugin, but I do not know much about the structuring of how to JS is complied for the game maker etc.

So what am I doing wrong? Why is it not allowing me to implement the 5th party member without the error? Is there a way to add the character to a list of select-able characters in the Party System (Yanfly says nothing about this in the help file or website so if there is I have no idea how to do it)

Any help would be greatly appreciated, thank you so much.
 
Last edited:

cward3223

Villager
Xy$
0.00
Figured out the issue, it was the conditional branch I was using, I was trying to check if there was already 4 members in the party via script, and was doing it wrong, but for those who don't know how to properly check how many characters are in your current party the script line you want to use is
Code:
$gameParty.size() == 4
you can replace that number with however many you are wanting to check for.
 
Last edited:

Ravani Lestari

Towns Guard
Xy$
0.00
Is this just a default problem that comes with using the plugin? My game is going to have quite a handful of characters, so I'll be using this plugin as well.
 

cward3223

Villager
Xy$
0.00
I understand completely. I know Javascript from a Web Development standpoint, so using it in an application is a little bit different, but the concept is similar. Yanfly is a great programmer, so I don't see you having any issues with the Party System :)
 

LTN Games

Master Mind
Resource Team
Xy$
0.01
Locking due to being solved, if you have any reason to re-open this topic, then please report the post or contact a moderator.
 
Status
Not open for further replies.
Top