Lua 的If Else用法

来源:互联网 发布:软件许可协议文本 编辑:程序博客网 时间:2024/05/22 17:47




function GetValue()    local a=channel.GetChild(0):GetValue()local b=channel.GetChild(1):GetValue()local c=channel.GetChild(2):GetValue()local d=channel.GetChild(3):GetValue()    local val=0if c<1 and a<b then        val=0elseif  c>=d and a>b thenval=0elseval=a-bendreturn valend


原创粉丝点击