
Aeiras":25xp6vhw said:Ok, I just got a new one tonight, involving the Scene_Battle. I set it up so a monster would drop an item 1/5 of the time. When we reach the end of the battle, I get an error on line 624 of the script, stating "too few arguments" if the item did indeed drop that fight.
The script: Scene_Battle
Line 624: text = sprintf(Vocab::ObtainItem, item.name)
# If return value is false
if result == false
# End
return false
end
#=========================================================================
# â—
class Bitmap
alias wora_bug_bmp_gfr gradient_fill_rect unless method_defined?('wora_bug_bmp_gfr')
def gradient_fill_rect(*args)
args.pop if args.size == 4 || 7 and !args.last
wora_bug_bmp_gfr(*args)
end
end
# Test 7 Args
@win = Window_Base.new(0,0,200,200)
@win.contents.gradient_fill_rect(0,0,10,100,Color.new(0,0,0),Color.new(255,255,255),true)
@win.contents.gradient_fill_rect(20,0,10,100,Color.new(0,0,0),Color.new(255,255,255),false)
# Test 4 Args
@win2 = Window_Base.new(0,200,200,200)
rect = Rect.new(0,0,10,100)
@win2.contents.gradient_fill_rect(rect,Color.new(0,0,0),Color.new(255,255,255),true)
rect = Rect.new(20,0,10,100)
@win2.contents.gradient_fill_rect(rect,Color.new(0,0,0),Color.new(255,255,255),false)
# Test 6 Args
@win = Window_Base.new(0,0,200,200)
@win.contents.gradient_fill_rect(0,0,10,100,Color.new(0,0,0),Color.new(255,255,255))
@win.contents.gradient_fill_rect(20,0,10,100,Color.new(0,0,0),Color.new(255,255,255))
# Test 3 Args
@win2 = Window_Base.new(0,200,200,200)
rect = Rect.new(0,0,10,100)
@win2.contents.gradient_fill_rect(rect,Color.new(0,0,0),Color.new(255,255,255))
rect = Rect.new(20,0,10,100)
@win2.contents.gradient_fill_rect(rect,Color.new(0,0,0),Color.new(255,255,255))
class Bitmap
alias wora_bug_bmp_gfr gradient_fill_rect unless method_defined?('wora_bug_bmp_gfr')
def gradient_fill_rect(*args)
args.pop if args.size == 7 and !args.last
wora_bug_bmp_gfr(*args)
end
end