主题:求助,程序小问题,万分感激。。。
求助,感激涕零。。。
下面程序没有语法错误,但运行时就是出现问题:问题截屏如附件图片
()
OccupyNumber=0
if (space(PPC_x+1,PPC_y,PPC_z) ==1) then
OccupyNumber=OccupyNumber+1
end if
if (space(PPC_x-1,PPC_y,PPC_z) ==1) then
OccupyNumber=OccupyNumber+1
end if
if (space(PPC_x,PPC_y+1,PPC_z) ==1) then
OccupyNumber=OccupyNumber+1
end if
if (space(PPC_x,PPC_y-1,PPC_z) ==1) then
OccupyNumber=OccupyNumber+1
end if
if (space(PPC_x,PPC_y,PPC_z-1) ==1) then
OccupyNumber=OccupyNumber+1
end if
if (OccupyNumber>=3) then
space(PPC_x,PPC_y,PPC_z)=1
goto 100
end if
下面程序没有语法错误,但运行时就是出现问题:问题截屏如附件图片
()
OccupyNumber=0
if (space(PPC_x+1,PPC_y,PPC_z) ==1) then
OccupyNumber=OccupyNumber+1
end if
if (space(PPC_x-1,PPC_y,PPC_z) ==1) then
OccupyNumber=OccupyNumber+1
end if
if (space(PPC_x,PPC_y+1,PPC_z) ==1) then
OccupyNumber=OccupyNumber+1
end if
if (space(PPC_x,PPC_y-1,PPC_z) ==1) then
OccupyNumber=OccupyNumber+1
end if
if (space(PPC_x,PPC_y,PPC_z-1) ==1) then
OccupyNumber=OccupyNumber+1
end if
if (OccupyNumber>=3) then
space(PPC_x,PPC_y,PPC_z)=1
goto 100
end if