mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-23 01:36:36 +08:00
🐛 fix score cache error
This commit is contained in:
parent
9b4494a24f
commit
bc989f2fb0
@ -116,7 +116,7 @@ func init() {
|
||||
canvas.Fill()
|
||||
canvas.DrawString(fmt.Sprintf("%d/%d", score, nextLevelScore), float64(back.Bounds().Size().X)*0.75, float64(back.Bounds().Size().Y)*1.62)
|
||||
|
||||
f, err := os.Open(drawedFile)
|
||||
f, err := os.Create(drawedFile)
|
||||
txtc := txt2img.TxtCanvas{Canvas: canvas}
|
||||
if err != nil {
|
||||
log.Errorln("[score]", err)
|
||||
@ -129,6 +129,7 @@ func init() {
|
||||
return
|
||||
}
|
||||
_, err = txtc.WriteTo(f)
|
||||
_ = f.Close()
|
||||
if err != nil {
|
||||
ctx.SendChain(message.Text("ERROR:", err))
|
||||
return
|
||||
|
||||
Loading…
Reference in New Issue
Block a user