ai galera se alguem souber mi ajudar por favor
acho q esseé o único erro no "meu" script vlw!
a foto do erro e mais em baixo o script
http://s7.postimage.org/t0man9muz/imagem.jpg
acho q esseé o único erro no "meu" script vlw!
a foto do erro e mais em baixo o script
http://s7.postimage.org/t0man9muz/imagem.jpg
- Spoiler:
class Spriteset_Map
alias dnr_initialize initialize
alias dnr_dispose dispose
alias dnr_update update
def initialize
create_names
dnr_initialize
end
def update
dnr_update
update_names
end
def dispose
dnr_dispose
dispose_names
end
def create_names
@names = []
for event in $game_map.events.values
next if event.list == nil
for command in event.list
next if command.code != 108
if command.parameters[0].include?("cmd:nome=")
name = command.parameters[0].sub("cmd:nome=","")
@names.push(Sprite_Name.new(event,name))
end
end
end
print @names
end
def update_names
for sprite in @names
sprite.update
end
end
def dispose_names
for sprite in @names
sprite.dispose
end
@names.clear
end
end
class Sprite_Name < Sprite
def initialze(event,name)
super(nil)
self.bitmap = Bitmap.new(120,20)
@event = event
self.ox = 60
self.z = 999
self.bitmap.font.color = Color.new(0,255,0)
self.bitmap.font.name = "Verdana"
self.bitmap.font.size = 14
self.bitmap.font.bold = true
self.bitmap.draw_text(0,0,120,20,name,1)
end
def update
super
self.x = @event.screen_x
self.y = @event.screen_y - 48
end
def dispose
self.bitmap.dispose
self.bitmap = nil
super
end
end