【问题标题】:math.random unexpected symbol errormath.random 意外符号错误
【发布时间】:2013-06-20 00:12:55
【问题描述】:

我试图通过使用此代码来增加 math.random:

testa = 100
testb = 150

badclouts:setLinearVelocity(0, math.random(.. testa, .. testb)) -- Drop down

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)) 上出现“意外符号”错误——下拉

我该如何解决这个问题?

【问题讨论】:

    标签: lua coronasdk


    【解决方案1】:

    只需在对badclouts:setLinearVelocity 的调用中删除.. 的两个实例。

    【讨论】:

      猜你喜欢
      • 2014-07-15
      • 1970-01-01
      • 2018-09-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-08-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多