查看: 2135|回复: 2

[已经解决] 我又来求助了,简单的脚本问题

[复制链接]
梦石
0
星屑
665
在线时间
50 小时
注册时间
2018-6-27
回帖
30
发表于 2018-7-17 13:39:48 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
  1. p = rand(12) + 1
  2. p p
  3.   if p =1
  4.   @MNSHPTT == "001-Blind01"
  5.   Graphics.transition(2, "Graphics/Transitions/001-Blind01")
  6.   end
  7.   if p = 2
  8.   @MNSHPTT== "002-Blind02"
  9.   Graphics.transition(2, "Graphics/Transitions/002-Blind02")
  10.   end
  11.   if p = 3
  12.   @MNSHPTT== "003-Blind03"
  13.   Graphics.transition(2, "Graphics/Transitions/003-Blind03")
  14.   end
  15.   if p = 4
  16.   @MNSHPTT== "004-Blind04"
  17.   Graphics.transition(2, "Graphics/Transitions/004-Blind04")
  18.   end
  19.   if p = 5
  20.   @MNSHPTT== "005-Stripe01"
  21.   Graphics.transition(2, "Graphics/Transitions/005-Stripe01")
  22.   end
  23.   if p = 6
  24.   @MNSHPTT== "006-Stripe02"
  25.   Graphics.transition(2, "Graphics/Transitions/006-Stripe02")
  26.   end
  27.   if p = 7
  28.   @MNSHPTT== "007-Line01"
  29.   Graphics.transition(2, "Graphics/Transitions/007-Line01")
  30.   end
  31.   if p = 8
  32.   @MNSHPTT== "008-Line02"
  33.   Graphics.transition(2, "Graphics/Transitions/008-Line02")
  34.   end
  35.   if p = 9
  36.   @MNSHPTT== "009-Random01"
  37.     Graphics.transition(2, "Graphics/Transitions/009-Random01")
  38.   end
  39.   if p =10
  40.   @MNSHPTT== "010-Random02"
  41.   Graphics.transition(2, "Graphics/Transitions/010-Random02")
  42.   end
  43.   if p = 11
  44.   @MNSHPTT== "011-Random03"  
  45.   Graphics.transition(2, "Graphics/Transitions/011-Random03")
  46.   end
  47.   if p = 12
  48.   @MNSHPTT== "012-Random04"  
  49.   Graphics.transition(2, "Graphics/Transitions/012-Random04")
  50. end
  51. p p
  52. p @MNSHPTT
复制代码

如题,第一次输出p是随机值,第二次输出p一定为12,为什么啊。还有最后输出@MHSHPTT是nil,为什么呢
梦石
0
星屑
39236
在线时间
11155 小时
注册时间
2009-3-15
回帖
4768
发表于 2018-7-17 13:54:30 | 显示全部楼层
变量代入是用=
不是==
等於是==不是=
你用错了..

评分

参与人数 2星屑 +25 赞 +2 收起 理由
guoxiaomi + 25 认可答案
笹舟丶萚 + 2 认可答案

查看全部评分

回复 1 0

使用道具 举报

梦石
0
星屑
4017
在线时间
604 小时
注册时间
2017-4-21
回帖
177
发表于 2018-7-17 14:17:17 | 显示全部楼层
if p =1、if p =2。。。这些都改成if p ==1、if p ==2
@MNSHPTT== "011-Random03"  都改成   @MNSHPTT= "011-Random03"  

评分

参与人数 2星屑 +25 赞 +1 收起 理由
guoxiaomi + 25 认可答案
笹舟丶萚 + 1 认可答案

查看全部评分

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部