Weird error?

Started by Vexus, August 02, 2012, 06:09:26 pm

Previous topic - Next topic

Vexus

So I was trying to find a way to increase the z value of the show pictures but I got an error so I reverted it back to how it was now I keep on getting an error on the same line for some reason :S

I tried closing/opening project but still getting error but it's like default..

Anyway the error is:

Script 'Interpreter 5' line 292: ArgumentError occurred.

wrong number of arguments(8 for 9)

All I'm trying to do is show a picture >_>

Please any help?

Thanks
Current Project/s:

ForeverZer0

August 02, 2012, 06:43:21 pm #1 Last Edit: August 02, 2012, 08:03:11 pm by ForeverZer0
Since you don't explain what exactly you did, its really impossible to say.
All you have to do is change the @viewport2 in Spriteset_Map to change the Z-axis value (globally for all pictures).

Aside from that, $game_screen.pictures[NAME].z = VALUE should suffice.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

KK20

Complete stab in the dark. That line in Interpreter 5 is this:
$game_screen.pictures[number].show(@parameters[1], @parameters[2],
      x, y, @parameters[6], @parameters[7], @parameters[8], @parameters[9])

Your error states that there are 8 arguments but requires 9.

Looking at Game_Pictures and taking a look at the method show, I see 8 parameters. Now I'm guessing that somewhere in your attempt to change the picture's Z value, you added another parameter to this method. Perhaps you forgot to remove this extra parameter when you went back to remove your edit?

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

ForeverZer0

If what KK20 suggested is the case, a simple method to achieve that would be this:

class Game_Picture
 
  alias z_show show
  def show(name, origin, x, y, zoom_x, zoom_y, opacity, blend_type, z = 0)
    z_show(name, origin, x, y, zoom_x, zoom_y, opacity, blend_type)
    $game_screen.pictures[number].z = z
  end
end
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Vexus

Yes I left a parameter "z" in game_picture while attempting to increase the z value.

Thanks this can be closed/deleted and sent into the sun  :^_^': 
Current Project/s: