Posted 04 January 2016 - 11:37 AM
Hi,
I was trying to make a circular radar with a proximity sensor, advanced computer and terminal glasses.
The program is supposed to display entities on a circular grid on the glasses.
Basically its supposed to make a circular radar grid rather than a rectangular one.
It first returned "Attempt to perform arithmetic on Nil"
After i messed around with it "Parameter height is missing"
Then i tried to fix it and got "Parameter X is missing"
Basically all i want to know is, how can i draw a circlular box with terminal glasses.
Would be really appreciated if one could explain and provide examples too!
Thanks!
I was trying to make a circular radar with a proximity sensor, advanced computer and terminal glasses.
The program is supposed to display entities on a circular grid on the glasses.
Basically its supposed to make a circular radar grid rather than a rectangular one.
ox=20
oy=10
width=20
height=10
color=colors.green
--[Functions]--
function createGui(ox, oy, width, height, color)
glasses.clear()
for y=-height,height,1 do
for x=-width,width,1 do
if x*x*height*height+y*y*width*width <= height*height*width*width then
glasses.addBox(ox+x, oy+y, color)
end
end
end
end
It first returned "Attempt to perform arithmetic on Nil"
After i messed around with it "Parameter height is missing"
Then i tried to fix it and got "Parameter X is missing"
Basically all i want to know is, how can i draw a circlular box with terminal glasses.
Would be really appreciated if one could explain and provide examples too!
Thanks!