Project1
标题:
我又来求助了,简单的脚本问题
[打印本页]
作者:
笹舟丶萚
时间:
2018-7-17 13:39
标题:
我又来求助了,简单的脚本问题
p = rand(12) + 1
p p
if p =1
@MNSHPTT == "001-Blind01"
Graphics.transition(2, "Graphics/Transitions/001-Blind01")
end
if p = 2
@MNSHPTT== "002-Blind02"
Graphics.transition(2, "Graphics/Transitions/002-Blind02")
end
if p = 3
@MNSHPTT== "003-Blind03"
Graphics.transition(2, "Graphics/Transitions/003-Blind03")
end
if p = 4
@MNSHPTT== "004-Blind04"
Graphics.transition(2, "Graphics/Transitions/004-Blind04")
end
if p = 5
@MNSHPTT== "005-Stripe01"
Graphics.transition(2, "Graphics/Transitions/005-Stripe01")
end
if p = 6
@MNSHPTT== "006-Stripe02"
Graphics.transition(2, "Graphics/Transitions/006-Stripe02")
end
if p = 7
@MNSHPTT== "007-Line01"
Graphics.transition(2, "Graphics/Transitions/007-Line01")
end
if p = 8
@MNSHPTT== "008-Line02"
Graphics.transition(2, "Graphics/Transitions/008-Line02")
end
if p = 9
@MNSHPTT== "009-Random01"
Graphics.transition(2, "Graphics/Transitions/009-Random01")
end
if p =10
@MNSHPTT== "010-Random02"
Graphics.transition(2, "Graphics/Transitions/010-Random02")
end
if p = 11
@MNSHPTT== "011-Random03"
Graphics.transition(2, "Graphics/Transitions/011-Random03")
end
if p = 12
@MNSHPTT== "012-Random04"
Graphics.transition(2, "Graphics/Transitions/012-Random04")
end
p p
p @MNSHPTT
复制代码
如题,第一次输出p是随机值,第二次输出p一定为12,为什么啊。还有最后输出@MHSHPTT是nil,为什么呢
作者:
soulsaga
时间:
2018-7-17 13:54
变量代入是用=
不是==
等於是==不是=
你用错了..
作者:
阮声悠悠
时间:
2018-7-17 14:17
if p =1、if p =2。。。这些都改成if p ==1、if p ==2
@MNSHPTT== "011-Random03" 都改成 @MNSHPTT= "011-Random03"
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1