[XP] Enu SBS Tanketai XP Error

Started by l0rdph0enix, August 10, 2011, 03:00:09 pm

Previous topic - Next topic

l0rdph0enix

August 10, 2011, 03:00:09 pm Last Edit: August 10, 2011, 05:21:44 pm by l0rdph0enix
[Edited]
Hey I'm trying to switch my battle systems from Rye CBS 0.6 to Enu SBS Tanketai XP battle system only problem is Enu SBS gives me this error


Script 'Sideview 2' line 3071: ArgumentError occurred.
wrong number of arguments(0 for 4)


It's located in the Sideview 2 part of the core scripts at the section.


#==============================================================================
# ■ Window_PartyCommand
#==============================================================================
class Window_PartyCommand < Window_Selectable
 #--------------------------------------------------------------------------
 alias initialize_n01 initialize
 #--------------------------------------------------------------------------
 def initialize
   initialize_n01
   self.z = 2000
 end
end


Here's the Enu SBS Tanketai XP core scripts.

SBS Config
SBS Config - XP
Sidview 1
Sideview 2

I'd really like for this battle system to work. Thank you in advance.

l0rdph0enix


l0rdph0enix


Apidcloud

August 19, 2011, 02:35:33 pm #3 Last Edit: August 19, 2011, 05:44:11 pm by Apidcloud
Well, you're mostly like missing a super there.
If you check the original Window_PartyCommand Script, you'll see that it uses super syntax.

Super is used to fill the necessary arguments of father's class.
If you check Window_Selectable, it will link to Window_Base, and on this last, you will see that there are 4 arguments there. That are the arguments that you're missing to fill.

Now, you can ask(I hope): Why does Window_Base has a super() ?

If you open rmxp helper, and search for Window, you will find a page that has the Window properties.
The class method from Window class is Window.new([viewport]) .
Note that viewport is inside [] so it can be omitted. You only need to use super or super() to omit it :)

Well, I don't really think that I explained it very well... but some time ago I asked what was the use of super, and blizzard taught me :P
Check the topic out:
http://forum.chaos-project.com/index.php/topic,9119.0.html

Credit Blizzard :)
Instead of wanting to be somebody else, rather become somebody else



"I will treasure the knowledge like a squirrel treasures acorns."


Gibbo Glast 2D Engine - The sky is no longer a limit

l0rdph0enix

Thank you for explaining that, but when I add in the super or super() I still get the same error.


initialize_n01


Is the part that the script editor tells me the problem is at.

Apidcloud

Because in that case, you need to specify the window's x, y, width and height.

Instead of using 'super', you need to use super(value_of_x, value_of_y, value_of_width, value_of_height)

Note that you need to specify each of that value on Window_Base child's
Window_Selectable is Window's_Base child, and as your window is child from Window_Selectable, the arguments are passed =)

If you still have any doubts about this, try to read the first lines of standard editor windows.

See you
Instead of wanting to be somebody else, rather become somebody else



"I will treasure the knowledge like a squirrel treasures acorns."


Gibbo Glast 2D Engine - The sky is no longer a limit

l0rdph0enix

Ok so I found the Real culprit behind this error. Enu SBS Tanketai XP doesn't play well with SDK. Since I only need SDK for 1 script now thanks to game_guy converting my other SDK reliant scripts so that they no longer require it. I removed the one that did and SDK itself and BAM it works. Thanks for the assistance Apidcloud  you did help me learn something about the RGSS.