我们贴吧的人在使用倒计时皮肤的时候、发现有关倒计时的脚本在最新版的2.3版本和2.4版本都无效。
这是何为?
It is currently May 2nd, 2024, 7:17 am
倒计时的脚本无效了。(我说的中文)
-
- Posts: 5
- Joined: October 25th, 2011, 12:42 am
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: 倒计时的脚本无效了。(我说的中文)
I'm sorry, but we only do English on the forums.
-
- Posts: 5
- Joined: October 25th, 2011, 12:42 am
Re: 倒计时的脚本无效了。(我说的中文)
PROPERTIES = {year=0, month=0, day=0, hour=0, minute=0, second=0}jsmorley wrote:I'm sorry, but we only do English on the forums.
function Initialize()
stringDate = tolua.cast(SKIN:GetMeter("Date"), "CMeterString")
stringHour = tolua.cast(SKIN:GetMeter("Hour"), "CMeterString")
stringMinute = tolua.cast(SKIN:GetMeter("Minute"), "CMeterString")
stringSecond = tolua.cast(SKIN:GetMeter("Second"), "CMeterString")
end -- function Initialize
function Update()
local rLeft = os.time(PROPERTIES) - os.time()
local dLeft = math.floor(rLeft/60/60/24)
local hLeft = math.floor(rLeft/60/60)%24
local mLeft = math.floor(rLeft/60)%60
local sLeft = math.floor(rLeft)%60
stringDate:SetText(dLeft)
stringHour:SetText(hLeft)
stringMinute:SetText(mLeft)
stringSecond:SetText(sLeft)
end -- function Update
-
- Posts: 5
- Joined: October 25th, 2011, 12:42 am
Re: 倒计时的脚本无效了。(我说的中文)
你大爷的 劳资只会中文jsmorley wrote:I'm sorry, but we only do English on the forums.
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: 倒计时的脚本无效了。(我说的中文)
stringDate = tolua.cast(SKIN:GetMeter("Date"), "CMeterString")
tolua.cast has been removed from the Lua implementation.
Use:
stringDate = SKIN:GetMeter("Date")
tolua.cast has been removed from the Lua implementation.
Use:
stringDate = SKIN:GetMeter("Date")
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: 倒计时的脚本无效了。(我说的中文)
What does my uncle have to do with this?naiyewkul wrote: 你大爷的 劳资只会中文
-
- Posts: 1
- Joined: July 23rd, 2012, 12:48 pm
Re: 倒计时的脚本无效了。(我说的中文)
he means that the skin of countdown can‘t be used in 2.3 and2.4.and we think the problem is caused by that lua document
-
- Posts: 5
- Joined: October 25th, 2011, 12:42 am
Re: 倒计时的脚本无效了。(我说的中文)
Thank you for your kindness solutionsjsmorley wrote:stringDate = tolua.cast(SKIN:GetMeter("Date"), "CMeterString")
tolua.cast has been removed from the Lua implementation.
Use:
stringDate = SKIN:GetMeter("Date")