bad7530 发表于 2007-4-8 14:28:29

[求助]return和gosub沒有正確的對應

gosub *option
*option
csp -1
bg "Bgd/title.bmp",3
lsp 100,"button\opm.bmp",70,50   ;音量
lsp 101,"button\opb.bmp",200,50;大
lsp 102,"button\opp.bmp",240,50;.
lsp 103,"button\opc.bmp",300,50;中
lsp 104,"button\opp.bmp",340,50;.
lsp 105,"button\ops.bmp",400,34;小
lsp 106,"button\opscreen.bmp",80,120 ;畫面
lsp 107,"button\opw.bmp",260,120       ;視窗
lsp 108,"button\opf.bmp",400,120         ;全營幕
lsp 109,"button\opsp.bmp",80,200      ;文字速度
lsp 110,"button\opfast.bmp",240,200
lsp 111,"button\opcom.bmp",320,200
lsp 112,"button\opslow.bmp",400,195
lsp 113,"button\opexit.bmp",480,300      ;離開
spbtn 100,100
spbtn 101,101
spbtn 102,102
spbtn 103,103
spbtn 104,104
spbtn 105,105
spbtn 106,106
spbtn 107,107
spbtn 108,108
spbtn 109,109
spbtn 110,110
spbtn 111,111
spbtn 112,112
spbtn 113,113
*opwait
btnwait2 %100
if %100<=0 goto *opwait
;-----------------------------------------------------------------
if %100=105 mov %201,0:mp3vol %201;音量
if %100=104 mov %201,25:mp3vol %201
if %100=103 mov %201,50:mp3vol %201
if %100=102 mov %201,75:mp3vol %201
if %100=101 mov %201,100:mp3vol %201
;-------------------------------------------------------------------
if %100=107 mov %205,1:menu_window ;畫面
if %100=108 mov %205,0:menu_full
;-------------------------------------------------------------------
if %100=110 mov %206,50:textspeed 50 ;文字速度
if %100=111 mov %206,30:textspeed 30
if %100=112 mov %206,0:textspeed 0
return
;------------------------------------------------------------------------
if %100==113 goto *title

按某些按紐時會出現return和gosub沒有正確的對應..這是為什麼呢?
按exit也沒辦法離開...
請大大教一下我唄...

CountD 发表于 2007-4-9 16:28:08

RETURN的位置不正确,整个思路没有搞清楚。
在所有IF的最后加上GOTO *OPTION,然后当需要返回其他界面的时候用类似
IF %100==113 RETURN这样。
页: [1]
查看完整版本: [求助]return和gosub沒有正確的對應