Welcome Guest ( Log In | Register )


Post new topic Reply to topic  [ 3 posts ] 
  Thu Oct 01, 2015 1:55 am
User avatar

Sewer Rat

Location: At my desk ;)
So in my code I call a check data.include?(X) where x is a key like :draggable, or :has_rarity

For some reason my script is throwing back an error:

Saying that it cant convert my True or False Include statement to a color

It's confusing the fuck out of me because I issued every check I know to make sure thats not whats going on. I checked for any open Color classes and there is none, if I set the 2 variables to false / true the error goes away but if I do a data.include?() of any kind, on a string, a float, a numeric, or a symbol is throws the error.

So what the hell is going on? It is obviously a problem with the class :P just don't know what!

If I figure it out ill make sure to update! if you need some of the source let me know!

Check out my blog for more scripts and info

Top Top

  Thu Oct 01, 2015 3:58 am
very undead
User avatar

Comic Relief

Location: Australia
Saying that it cant convert my True or False Include statement to a color
I don't think its complaining about that. It seems like you're giving data the symbol :draggable but it for some reason wants you to pass a Color instead.

Is data a regular instance of a Hash Array?

EDIT: Disregard all that, I have no idea what I'm talking about. From the looks of things, data is an array which you give values. I have no idea how symbols work though, but I'm assuming you pass [:draggable] as data and run a test on it that way.

Even though it's not as clean, I'd probably just use an enumerator or strings instead. I don't quite understand symbols or why to use them.


Last edited by ZenVirZan on Thu Oct 01, 2015 5:01 am, edited 2 times in total.

Top Top

  Thu Oct 01, 2015 4:41 am
User avatar

Mysterious Wizard
if it's a key should it be in []
@draggable = (data.include?([:draggable]))

idk if this would work by losing .include?()
@draggable = (data[:draggable] == nil ? false: true)

Top Top
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

Who is online

Users browsing this forum: No users and 4 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

We are an independent, not-for-profit game making community.
Board Index
About Us
Downloadable Games
Free Browser Games
Games in Development
RPG Maker Support
Game Maker Support
Construct 2 Support
HBGames the eZine
Advanced RPG Maker
Site Announcements
Powered by phpBB © phpBB Group