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:
What can i do to fix this?
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
# * 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?