设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1623|回复: 2
打印 上一主题 下一主题

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

[复制链接]

Lv2.观梦者

梦石
0
星屑
660
在线时间
50 小时
注册时间
2018-6-27
帖子
49
跳转到指定楼层
1
发表于 2018-7-17 13:39:48 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
  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,为什么呢

Lv5.捕梦者

梦石
0
星屑
33178
在线时间
10489 小时
注册时间
2009-3-15
帖子
4756
2
发表于 2018-7-17 13:54:30 | 只看该作者
变量代入是用=
不是==
等於是==不是=
你用错了..

评分

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

查看全部评分

回复 支持 1 反对 0

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
3997
在线时间
603 小时
注册时间
2017-4-21
帖子
229
3
发表于 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 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-4-27 08:31

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表