Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Method and Class Library help

Im trying to Run Leonheart's equipment creator script in game, but when i try to load an item into the creator in game, it comes up with an error:

Script "MACL" Line 5547: Type Error occured
cannot covert nil into string

Here is the section it's refering to:
#--------------------------------------------------------------------------
# * Draw Text : Get Positions
#--------------------------------------------------------------------------
def draw_text_positions(*args)
if (r = args[0]).is_a?(Rect)
x, y, w, h, t = r.x, r.y, r.width, r.height, args[1]
a = args.size == 3 ? args[2] : 0
else
x, y, w, h, t = args[0], args[1], args[2], args[3], args[4]
a = args.size == 6 ? args[5] : 0
end
return x, y, w, h, t, a
end
#--------------------------------------------------------------------------
# * Draw Text : Effect Shadow
#--------------------------------------------------------------------------
def draw_text_shadow(*args)
orig_color = font.color.dup
self.font.color = self.font.shadow_color
x, y, w, h, t, a = *draw_text_positions(*args)
(HERE>>) basic_draw_text(x + 2, y + 2, w, h, t, a)
self.font.color = orig_color
end
#--------------------------------------------------------------------------
# * Draw Text : Outline Shadow
#--------------------------------------------------------------------------
def draw_text_outline(*args)
orig_color = font.color.dup
self.font.color = self.font.outline_color
x, y, w, h, t, a = *draw_text_positions(*args)
for i in -1..1
for j in -1..1
basic_draw_text(x + i, y + j, w, h, t, a)
end
end
self.font.color = orig_color
end

What can i do to fix this?
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top