小编law*_*s16的帖子

这个lua脚本有什么问题

RPS = {}
RPS[1] = "Rock"
RPS[2] = "Paper"
RPS[3] = "Scissors"
function RPS()
    playerOne = math.random( #RPS ) 
    playerTwo = math.random( #RPS )

    if playerOne == playerTwo then
        print("It is a tie\n Player One played "..playerOne.."\n Player Two played "..playerTwo..)
    elseif playerOne == RPS[1] then
        if playerTwo == RPS[2] then
            print("Player Two wins\n Player One played "..playerOne.."\n Player Two played "..playerTwo..)
        else
            print("Player One wins\n Player One played "..playerOne.."\n Player Two played "..playerTwo..)
        end
    elseif playerOne == RPS[2] then …
Run Code Online (Sandbox Code Playgroud)

lua

2
推荐指数
1
解决办法
149
查看次数

标签 统计

lua ×1