Chaos Project

RPG Maker => RPG Maker Scripts => Script Troubleshooting => Topic started by: Yin on May 31, 2009, 12:19:02 pm

Title: Yin Is Requesting Help!
Post by: Yin on May 31, 2009, 12:19:02 pm
Ok, I am trying to put this ring menu http://punkid89.b1.jcink.com/index.php?showtopic=831 (http://punkid89.b1.jcink.com/index.php?showtopic=831) in this battle system http://www.rmxp.org/forums/viewtopic.php?f=11&t=62914 (http://www.rmxp.org/forums/viewtopic.php?f=11&t=62914) and the ctb+the individual battle commands add ons. Why would I be getting this error?
Spoiler: ShowHide
Script 'Ring Menu' line 373: NoMethodError occured.
undefined method '[]' for #<Game_Actor:0x3e95318>
That line points to this
rect = Rect.new(0, 0, @icons[j].width, @icons[j].height)


Also, if you have spare time, there is also a topic in the request forum (not a request anymore) for an item menu. I also need help with that.

Thank you and any help is appreciated. I can make a demo if needed.
Well, here is the demo so you can see what I have so far.
http://www.sendspace.com/file/xmmr7s
Title: Re: Yin Is Requesting Help!
Post by: Seox on June 13, 2009, 10:08:16 pm
Ok, other, more experienced scripters, correct me if I'm wrong, but:

I know that rect has SOMETHING to do with visuals, be it pictures or text. I'd assume that that line tells the menu which icons to put down. What's puzzling is the fact that it says 'undefined method '[]' for #<Game_Actor:0x3e95318>'. Long story short, it's having a problem trying to do something with the icons in the menu it's filling that slot in with one of the game's actors. Not an icon. Literally. That's like if you tried to put a person into the coin RETURN in a PAYPHONE in order to make a call.


Yeahhhh....

Will the ring menu work alone?

Just offhand, it's looking like, SOMEHOW, (this doesn't make any sense- either something is really screwy, or I have NO IDEA what I'm talking about.) @icons is being filled with a party member.

O_O

Non-scripter's translation: (If I'm right.)

The script is trying to pay with oranges what it should be paying with apples.

Give me a few and I'll check your script, see what I can do.

Sorry if that was confusing - gimme a heads up and I'll try to elaborate.
Title: Re: Yin Is Requesting Help!
Post by: Yin on June 13, 2009, 10:32:30 pm
Well, lol, I understand although sometimes I wish I can do that, it isn't possible. And no, the ring menu is just a skeleton. I have to put all the meat and skin on it. I'm not exactly a scripter, I'm just learning as I go. Guess I started with something too complicated.
Title: Re: Yin Is Requesting Help!
Post by: Seox on June 13, 2009, 10:50:40 pm
It's ok - I'm just starting out, too, and I'm learning very quickly. I've been edit-ing a materia script for a while now, and have come a LONG way with it. I'd try to find a simpler script - try editing instead of making half of a body (minus the skeleton, metaphorically). You'll be surprised by what you learn. I'm sorry that I couldn't be of greater help.
Title: Re: Yin Is Requesting Help!
Post by: Ryex on June 13, 2009, 10:57:29 pm
the problem, the REAL problem is

script ACBS | Individual Battle Commands line 169 why the HELL are you passing @active_battler as the icons array?
Title: Re: Yin Is Requesting Help!
Post by: Seox on June 13, 2009, 11:30:45 pm
Bam.

Rye, wasn't I SORTA right, as somehow an instance of Game_Actor was being passed to @icons? I just didn't want to say it in rubyist terms, because I didn't know whether or not Yin was fluent. Regardless, the method [] (or an index-value relationship) isn't available for Game_Actor. And the line included @index. So what was SUPPOSED to be the index was being passed in as an actor.

>.>

Right?

Thanks for the reply - I think I've learned something, Rye!

(OMG. That rhymed. And it sounded weird.

Please shoot me.)
Title: Re: Yin Is Requesting Help!
Post by: Ryex on June 13, 2009, 11:45:57 pm
Quote from: Seox on June 13, 2009, 11:30:45 pm
Bam.

Rye, wasn't I SORTA right, as somehow an instance of Game_Actor was being passed to @icons? I just didn't want to say it in rubyist terms, because I didn't know whether or not Yin was fluent. Regardless, the method [] (or an index-value relationship) isn't available for Game_Actor. And the line included @index. So what was SUPPOSED to be the index was being passed in as an actor.

>.>

Right?




1)yes your right because he was using @active_battler as the icons array when  he tried @icons it pulled a NoMethod error

Quote from: Seox on June 13, 2009, 11:30:45 pm
Thanks for the reply - I think I've learned something, Rye!

(OMG. That rhymed. And it sounded weird.

Please shoot me.)

2) then use Ryex instead its weird when people refer to me as Rye it sound like they are calling me a type of bread! lol!
Title: Re: Yin Is Requesting Help!
Post by: Seox on June 13, 2009, 11:50:25 pm
XD, got it, Ryex.

Thanks for the feedback there ^_^
Title: Re: Yin Is Requesting Help!
Post by: Yin on June 14, 2009, 12:50:53 pm
(I'm a she, btw) Anyway, thanks! I'll try to tackle this again. But it's weird I don't understand how the active_battlers are going into the icons. I'll look that over.
Title: Re: Yin Is Requesting Help!
Post by: Ryex on June 14, 2009, 01:18:47 pm
lol second time i'v made that mistake in two days sorry! (I really should start looking at the gender underneath the avatars)