- 295
- Posts
- 7
- Years
- Seen Aug 15, 2022
i added it but i get still the same error, I don't know why...
Oh, has it something to do with unreal time System?
Oh! 'getHour' is a code of Ego13 and this variable you don't call will give you a error. 'Unreal time System' is a difference calculation, it work and don't give a error, just change calculation time.
Ok, if you don't know how to add script when you read my post above, this is a example script you will need add and you can change this if you want:
Code:
hourreal = pbGetTimeNow.hour
minreal = pbGetTimeNow.min
@sprites["newsprite"] = Sprite.new(@viewport)
@sprites["newsprite"].bitmap = Bitmap.new(Graphics.width, Graphics.height)
@sprites["newsprite"].bitmap.clear
pbSetSystemFont(@sprites["newsprite"].bitmap)
textposition = []
textposition.push([_INTL("{1} - {2} - {3}",Time.now.day.to_i,Time.now.month.to_i,Time.now.year.to_i),5,7,0,Color.new(198,228,61),Color.new(158,180,57)])
if hourreal >= 10
if minreal >= 10
textposition.push([_INTL("{1}:{2}",Time.now.hour.to_i,Time.now.min.to_i),167,7,2,Color.new(246,211,105),Color.new(212,183,96)])
else
textposition.push([_INTL("{1}:0{2}",Time.now.hour.to_i,Time.now.min.to_i),167,7,2,Color.new(246,211,105),Color.new(212,183,96)])
end
else
if minreal >= 10
textposition.push([_INTL("0{1}:{2}",Time.now.hour.to_i,Time.now.min.to_i),167,7,2,Color.new(246,211,105),Color.new(212,183,96)])
else
textposition.push([_INTL("0{1}:0{2}",Time.now.hour.to_i,Time.now.min.to_i),167,7,2,Color.new(246,211,105),Color.new(212,183,96)])
end
end
pbDrawTextPositions(@sprites["newsprite"].bitmap,textposition)
Last edited: