其实是最后一个程序/报告器没有end
有意思,能把代码复制粘贴上来吗?
稍等
extensions[dialog]
globals[xa lose?]
to setup
ca
ask patch xa -16 [
set pcolor green
]
set lose? false
end
to go
ifelse lose? = true [stop] [
ask patches with [pycor = -16 and pxcor != xa]
[
set pcolor black
]
ask patch xa -16 [
set pcolor green
]
if xa = -16 [
set xa -15
]
if xa = 16 [
set xa 15
]
ifelse mouse-down? = true [
ifelse mouse-xcor < 0 [
set xa xa - 1
] [
set xa xa + 1
]
]
every 0.1 [
repeat 2 [
ask one-of patches with [pycor = 16] [
set pcolor red
]
]
]
every 0.1 [
ask patches with [pcolor = red] [
let a pxcor
let b pycor - 1
set pcolor black
ask patch a b [
set pcolor red
]
]
]
ask patch xa -15 [
ifelse pcolor = red [
dialog:user-message “你输了!!!\n” “”
set lose? true
]
]
]
加了end就没问题了
噢所以是点编译之后出现的错误对吧
对
的