[r257] Argument checks in Tone, Color and Font

Started by Blizzard, May 20, 2011, 12:17:48 pm

Previous topic - Next topic

Blizzard

In future, if there are questions about specific revisions or something like that, include it in a tag like I did.

Now to my question. I noticed that F0 added argument checks in rb_initialize using scan_args in Color, Tone and Font. Are they needed in Color and Tone? I made rb_initialize calls rb_set and that one already has the checks. Is there any particular reason for this?
Since I noticed a comment, I guess you're not sure yourself, F0. :P In any case, you should check out the problem in RMXP and ARC to see if there is any difference.

As for the Font, does Font.new without arguments work as well?
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

ForeverZer0

Yes, I was slightly unsure if they belonged there.

As for the Font, now that you mention it, I did mess that up. I made it so that one argument is required, with one optional. I should have used "02", not "11". :P

I do have a couple questions on how to implement a few of these, mainly for methods that take only one required argument.
I see how to do it easy enough when argc and argv are defined, but I am unsure what value to use to replace argv for single arguments.

Could you make me one quick example? I'll do the rest after that. Example would be the setter for the bitmap in the sprite class or something.
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.

Blizzard

(int argc, VALUE* argv) is only necessary if you have optional arguments or you can call a method with different numbers of arguments.
If all arguments are required, you just put those arguments in there normally.
I'll be in IRC today so ask me there for the details.

I'll fix the thing with Font.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.