コメント

このコメントは、【トピック】複雑なスクリプトの質問へのコメントです。

コメントの内容

000 1  mini naoki(投稿日:2011/07/07 08:07/07/11)
早速、少し改良して、
setVariable("buki", "ライムソード") #aは素材名。bは素材の数。cは表示の名前
setVariable("sozai1a", "青い皮") 
setVariable("sozai1b", 3)
setVariable("sozai1c", "「ライムソード」素材1「青い皮」") 
setVariable("sozai2a", "柔らかい骨入手") 
setVariable("sozai2b", 1)
setVariable("sozai2c", "「ライムソード」素材2「柔らかい骨」") 
setVariable("sozai3a", "青色の成分入手") 
setVariable("sozai3b", 2)
setVariable("sozai3c", "「ライムソード」素材3「青色の成分」") 
def mise() 
aa = getVariable("sozaai1a")
bb = getVariable("sozai1b")
if((aa >= bb))
setTextFontColor(250, 250, 250) 
else  
setTextFontColor(250, 250, 0) 
end
    setVariable("", getVariable("sozai1c"),  "", 
  createText(512 - 440, 10, 160, 22))

setText(getVariable(getVariable("", getVariable("sozai1c"),  "",  
 "", getVariable("sozai1a"),  " ","", getVariable("sozai1c"),  ""), "", getVariable("sozai1b"),  "")

cc = getVariable("sozai2a")
dd = getVariable("sozai2a")
if((cc >= dd))
 setTextFontColor(250, 250, 250) 
else  
setTextFontColor(250, 250, 0) 
end
    setVariable("", getVariable("sozai2c"),  "", 
  createText(512 - 440, 10, 160, 22))

setText(getVariable(", getVariable(""sozai2c"),  "",  
 "", getVariable("sozai2a"),  "","", getVariable("sozai2c"),  ""), "", getVariable("sozai2b"),  "")
 
ee = getVariable("sozai3a")
ff = getVariable("sozai3b")
if((ee >= ff))
 setTextFontColor(250, 250, 250) 
else  
setTextFontColor(250, 250, 0) 
end
    setVariable("", getVariable("sozai3c"),  "", 
  createText(512 - 440, 10, 160, 22))

setText(getVariable(", getVariable(""sozai3c"),  "",  
 "", getVariable("sozai3a"),  "","", getVariable("sozai3s"),  ""), "", getVariable("sozai3b"),  "")
case speakWithSelect(2,"はい","いいえ", 
    "{店員}\nこの素材だけど、いい?")
  when 0
deleteText(getVariable("", getVariable("sozai1c"), ""))
deleteText(getVariable("", getVariable("sozai2c"), ""))
deleteText(getVariable("", getVariable("sozai3c"), ""))

aa = getVariable("sozai1a")
cc = getVariable("sozai2a")
ee = getVariable("sozai3a")
bb = getVariable("sozai1b")
dd = getVariable("sozai2b")
ff = getVariable("sozai3b")
if((aa >= bb) && (cc >= dd) && (ee >= ff)) 
hideImage()
speak("{店長}\nはい。これが「", getVariable("buki"),  "」だ。\n大事にしろよ。")
setVariable("", getVariable("sozai1a"),  "",getVariable("", getVariable("sozai1a"),  "")- getVariable("sozaai1b"))
setVariable("", getVariable("sozai2a"),  "",getVariable("", getVariable("sozai2a"),  "")-getVariable("sozai2b"))
setVariable("", getVariable("sozai3a"),  "",getVariable("", getVariable("sozai3a"),  "")-getVariable("sozai3b"))
else  
hideImage() 
speak("{店長}\n素材が足りないぞ・・・。")

end

  when 1
hideImage() 
deleteText(getVariable("", getVariable("sozai1c"), ""))
deleteText(getVariable("", getVariable("sozai2c"), ""))
deleteText(getVariable("", getVariable("sozai3c"), ""))
end
end

と、開始スクリプトに入れる事にしました。
開始スクリプト : syntax error, コードに文法的な間違いがあります。 line(行): 25

とエラーしました。変数の名前もかえました。
25行目でどんなエラーが出たのでしょうか?

コメントの内容(一番最初の投稿)

000 1  mini naoki(投稿日:2011/07/07 08:07/07/11)
早速、少し改良して、
setVariable("buki", "ライムソード") #aは素材名。bは素材の数。cは表示の名前
setVariable("sozai1a", "青い皮") 
setVariable("sozai1b", 3)
setVariable("sozai1c", "「ライムソード」素材1「青い皮」") 
setVariable("sozai2a", "柔らかい骨入手") 
setVariable("sozai2b", 1)
setVariable("sozai2c", "「ライムソード」素材2「柔らかい骨」") 
setVariable("sozai3a", "青色の成分入手") 
setVariable("sozai3b", 2)
setVariable("sozai3c", "「ライムソード」素材3「青色の成分」") 
def mise() 
aa = getVariable("sozaai1a")
bb = getVariable("sozai1b")
if((aa >= bb))
setTextFontColor(250, 250, 250) 
else  
setTextFontColor(250, 250, 0) 
end
    setVariable("", getVariable("sozai1c"),  "", 
  createText(512 - 440, 10, 160, 22))

setText(getVariable(getVariable("", getVariable("sozai1c"),  "",  
 "", getVariable("sozai1a"),  " ","", getVariable("sozai1c"),  ""), "", getVariable("sozai1b"),  "")

cc = getVariable("sozai2a")
dd = getVariable("sozai2a")
if((cc >= dd))
 setTextFontColor(250, 250, 250) 
else  
setTextFontColor(250, 250, 0) 
end
    setVariable("", getVariable("sozai2c"),  "", 
  createText(512 - 440, 10, 160, 22))

setText(getVariable(", getVariable(""sozai2c"),  "",  
 "", getVariable("sozai2a"),  "","", getVariable("sozai2c"),  ""), "", getVariable("sozai2b"),  "")
 
ee = getVariable("sozai3a")
ff = getVariable("sozai3b")
if((ee >= ff))
 setTextFontColor(250, 250, 250) 
else  
setTextFontColor(250, 250, 0) 
end
    setVariable("", getVariable("sozai3c"),  "", 
  createText(512 - 440, 10, 160, 22))

setText(getVariable(", getVariable(""sozai3c"),  "",  
 "", getVariable("sozai3a"),  "","", getVariable("sozai3s"),  ""), "", getVariable("sozai3b"),  "")
case speakWithSelect(2,"はい","いいえ", 
    "{店員}\nこの素材だけど、いい?")
  when 0
deleteText(getVariable("", getVariable("sozai1c"), ""))
deleteText(getVariable("", getVariable("sozai2c"), ""))
deleteText(getVariable("", getVariable("sozai3c"), ""))

aa = getVariable("sozai1a")
cc = getVariable("sozai2a")
ee = getVariable("sozai3a")
bb = getVariable("sozai1b")
dd = getVariable("sozai2b")
ff = getVariable("sozai3b")
if((aa >= bb) && (cc >= dd) && (ee >= ff)) 
hideImage()
speak("{店長}\nはい。これが「", getVariable("buki"),  "」だ。\n大事にしろよ。")
setVariable("", getVariable("sozai1a"),  "",getVariable("", getVariable("sozai1a"),  "")- getVariable("sozaai1b"))
setVariable("", getVariable("sozai2a"),  "",getVariable("", getVariable("sozai2a"),  "")-getVariable("sozai2b"))
setVariable("", getVariable("sozai3a"),  "",getVariable("", getVariable("sozai3a"),  "")-getVariable("sozai3b"))
else  
hideImage() 
speak("{店長}\n素材が足りないぞ・・・。")

end

  when 1
hideImage() 
deleteText(getVariable("", getVariable("sozai1c"), ""))
deleteText(getVariable("", getVariable("sozai2c"), ""))
deleteText(getVariable("", getVariable("sozai3c"), ""))
end
end

と、開始スクリプトに入れる事にしました。
開始スクリプト : syntax error, コードに文法的な間違いがあります。 line(行): 25

とエラーしました。変数の名前もかえました。
25行目でどんなエラーが出たのでしょうか?