コードの問題を理解するのを手伝ってください。関数を定義しています
local function goOnLesson()
if date.hour==1 then
index=1
local subj=schToday[index]
local text = display.newRetinaText("А сейчас у тебя: "..subj, 0, 0, native.systemFont, 70)
text:setTextColor(128,64,0)
text:setReferencePoint(display.CenterReferencePoint)
localGroup:insert(text)
end
end
そして、私がそれを実行しているとき、すべてが大丈夫です。
コードを再編成しましたが、ブロックする必要はありません
local function goOnLesson()
index=1
local subj=schToday[index]
local text = display.newRetinaText("А сейчас у тебя: "..subj, 0, 0, native.systemFont, 70)
text:setTextColor(128,64,0)
text:setReferencePoint(display.CenterReferencePoint)
localGroup:insert(text)
end
if-endブロックを削除しましたが、機能しなくなりました。助けてください :)