math.random意外符号错误

我正在尝试使用以下代码逐渐增加math.random:

testa = 100
testb = 150

badclouts:setLinearVelocity(0, math.random(.. testa, .. testb)) -- 下落

local function speatTimer()
   testa = testa+1
   testb = testb+1
   --print("testa " .. testa)
   --print("testb " .. testb)
end
local mainTimer = timer.performWithDelay( 1000, speatTimer, 500 )

但在badclouts:setLinearVelocity(0, math.random(.. testa, .. testb)) -- 下落上遇到了'意外符号'错误。

我该如何解决这个问题?

点赞
用户107090
用户107090

只需在调用badclouts:setLinearVelocity的两个实例中移除..即可。

2013-06-19 16:12:55