p_picture_05.y <= (1000 - p_picture_05.height)
報syntax error,為什么呢?沒搞懂,是資料型別錯了嗎?
uj5u.com熱心網友回復:
估計是要報錯的,你這運算式回傳的是 boolean 型別的資料.不知道你上面那句是不是該整行代碼.
uj5u.com熱心網友回復:
就相當于你直接用boolean 資料 true 或 false 當做一行代碼.那是要提示句法錯誤的.uj5u.com熱心網友回復:
具體是這樣的:if p_picture_05.y <= (1000 - p_picture_05.height) and p_picture_05.x <= (2300 - p_picture_05.width)and p_picture_05.y >= 0 and p_picture_05.x >= 0 then
choose case i_MoveFlag
case "←"
p_picture_05.x -=i_sudu
case "→"
p_picture_05.x +=i_sudu
case "↑"
p_picture_05.y -=i_sudu
case "↓"
p_picture_05.y +=i_sudu
end choose
else
timer(0)
if p_picture_05.y > (1000 - p_picture_05.height) then
p_picture_05.y = (1000 - p_picture_05.height)
elseif p_picture_05.x > (2300 - p_picture_05.width) then
p_picture_05.x = (2300 - p_picture_05.width)
elseif p_picture_05.y < 0 then
p_picture_05.y = 0
elseif p_picture_05.x < 0 then
p_picture_05.x = 0
end if
messagebox("提示","已移至邊界!")
end if
tab_kz_05.tabpage_yd_05.st_dqwz_05.text = " X 坐標:"+string(p_picture_05.x)+ " , Y 坐標:"+string(p_picture_05.y) //圖片位置
//文字顏色變化
long r_R, r_G, r_B
r_R = Rand(255)
r_G = Rand(255)
r_B = Rand(255)
tab_kz_05.tabpage_yd_05.st_dqwz_05.TextColor = RGB(r_R,r_G,r_B)
uj5u.com熱心網友回復:
解決了,謝謝。。。uj5u.com熱心網友回復:
續行符 & 呢?轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/93619.html
標籤:腳本語言
