Save-Point

Full Version: Save-Point
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Board Message
Sorry, you do not have permission to access this resource.
Save-Point - duel argument error

Save-Point

Full Version: duel argument error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
So i've been trying to incorporate a type of duel system into my game to take the place of scripted fighting scenes. When I searched online for a dueling script, i was brought to http://save-point.org/showthread.php?tid...light=duel. I copied the script and followed the instructions, but
still got an error message. can anyone tell me what i'm doing wrong, or if the script is wrong, how to fix it? This may be my first post, but if someone can help me out here, i'll definitely stick around. <3 rmxp
You need to remove the (31), because the internal script has no arguments (thus it has 0, but you have 1 there). ... but I suspect that value is necessary for specifying an opponent, thus the script is probably buggy.
Typos? Yes, there were a couple. Mostly failing to translate the popup of "Esquive et contre" into "Dodge and Attack". And there were a couple of others related to translation that don't affect the gameplay. Fixed.

What I see is a problem with your script call. You did properly add ID# 31 to your battler, thus calling the 31st monster in your database. That is correct. However, erase the 'space' that appears between .new and the (31) in your call so it would look like this:
Code:
$scene = Scene_Suikoden_Duel.new(31)

The (31) argument must be on the same line as the rest of the call for it to work.
... jeez I can't believe I read the argument error around the wrong way. I thought it was saying the original had zero arguments.

Ah, posted at midnight. Well that explains it. x -x
That fixed it and got the duel to start, only now this is happening:
[Image: nomethoderror.png?t=1317912801]


scripting is seriously NOT my forte...
I don't have RMXP here at work, so I drag-n-dropped the script to wordpad. No nine numbers for me to see, so I think the line in questions is...
Code:
animation_enemy = $data_enemies[$duel_enemy_id].animation2_id
... but don't quote me on that.

From what I see, it is likely you set your fight to an enemy that may not exist. That would explain why it's looking for a 2nd animation for a 'nil' enemy. So it's possible you set up your fight to enemy#36 and your database only has 35 enemies... or it's an empty slot in your Enemy database.

Could that be it?
no, it loads up the screen with the enemy properly. it occurs only a second after that.
It occurs because... you don't have a weapon for your player. It requires that your actor be equipped with a weapon. No weapon == nil weapon, and that's the problem.

Make sure you have a weapon equipped before entering battle. It's a pain, but... you're gonna have to do a check to make sure that at least something is in the lead guy's weapon slot.
AHA! That was the solution! Thanks for the insight. Everything worked fine after that, I just need to sort out the french in the script. Would it be against forum rules if I were to repost the script with clearer directions and the french translated to english?
I took care of the French in the script in regards of the 'Attaque' to 'Attack', and etc. And I removed the space from the .new (###) in the instructions too. The only thing needing adding is the fact that the actor needs a weapon.
Pages: 1 2