Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> raise?
Adrien.
post Aug 31 2011, 05:41 PM
Post #1


Bet Mapper
Group Icon

Group: Banned
Posts: 1,632
Type: Mapper
RM Skill: Advanced




does raise work in Rgss2? for raising errors and exceptions?


__________________________



Games I am working on | Each image is a link to the game
Go to the top of the page
 
+Quote Post
   
The Law G14
post Aug 31 2011, 06:08 PM
Post #2


Scripter FTW
Group Icon

Group: Local Mod
Posts: 1,346
Type: Scripter
RM Skill: Skilled
Rev Points: 5




Yes, I checked the help file and raise still works in RGSS2, it's just no longer a reserved word like it was in its predecessor (RGSS). It's now just a built-in function according to the Help File. If you'd like to no more about the usage of "raise", I copied an excerpt out of the Help File:

Help File Information
raise
Examples:

CODE
raise
raise "you lose"
raise SyntaxError.new("invalid syntax")
raise SyntaxError, "invalid syntax"


Syntax:

raise
raise message
raise exception
raise error_type, message

Throws an exception. In the first format, throws the last exception again. In the second format, given a string argument, throws a RuntimeError exception with the given string as a message. In the third format, throws the exception if the argument is an exception object. In the last format, throws the exception specified in the first argument with the message given in the second argument.

Thrown exceptions can be trapped with a rescue clause in begin.

raise is not a reserved word in Ruby, but rather an built-in function.


This post has been edited by The Law G14: Aug 31 2011, 06:08 PM


__________________________

To put in sig, copy this link:
CODE
[url="http://www.rpgrevolution.com/forums/index.php?showtopic=51540"][img]http://img40.imageshack.us/img40/6504/conceptthelawbanner.png[/img][/url]


Sig Stuff


"When you first come, no one knows you. When help them out, they all know you. When you leave, they all love you. When you come back, they've already forgotten you." -- copy into your sig if you think this quote speaks true!

If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others. -Exiled One

My Project Thread: Gai's Hunters


Go to the top of the page
 
+Quote Post
   
Adrien.
post Aug 31 2011, 06:35 PM
Post #3


Bet Mapper
Group Icon

Group: Banned
Posts: 1,632
Type: Mapper
RM Skill: Advanced




awesome thank you.


__________________________



Games I am working on | Each image is a link to the game
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 25th May 2013 - 02:06 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker