GRASS PROGRAM
Author |
Message |
Triple Five
|
Posted: Wed Dec 10, 2003 2:45 pm Post subject: GRASS PROGRAM |
|
|
code: | randint(gy,mingy,maxgy)
dify:=maxgy-mingy
if gy<mingy+(dify div 3) then
drawfillbox(gx,gy,gx+1,gy+5,119)
drawbox(gx,gy,gx+2,gy+5,215)
end if
if gy<mingy+(dify div 3*2+5) and gy>mingy+(dify div 3-5) then
drawfillbox(gx,gy,gx+1,gy+4,120)
drawbox(gx,gy,gx+2,gy+4,215)
end if
if gy<mingy+(dify div 3) then
drawfillbox(gx,gy+(dify div 3*2),gx+1,gy+4+(dify div 3*2),122)
drawbox(gx,gy+(dify div 3*2),gx+2,gy+4+(dify div 3*2),215)
end if
end for
drawbox(mingx,mingy,maxgx+2,maxgy,175)
end grass
setscreen("graphics:640;580,nocursor")
grass(-2,maxx,60,200) |
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
Tony
|
Posted: Wed Dec 10, 2003 2:54 pm Post subject: (No subject) |
|
|
umm I think you're missing a part of the code there... you didnt declear any variables or even started your forloops for that matter |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
Triple Five
|
Posted: Wed Dec 10, 2003 7:41 pm Post subject: (No subject) |
|
|
you would be right...i missed the var statements when i copied a past my code from winOOT to the forum (im a n00b) |
|
|
|
|
|
Triple Five
|
Posted: Wed Dec 10, 2003 7:57 pm Post subject: (No subject) |
|
|
at this to the top of the code
code: | var gx,gy,dify:int
procedure grass(mingx,maxgx,mingy,maxgy:int)
drawfillbox(mingx,mingy,maxgx+2,maxgy,117)
drawbox(mingx,mingy,maxgx+2,maxgy,175)
for i:0..20000 |
and it should work |
|
|
|
|
|
poly
|
Posted: Wed Dec 10, 2003 8:17 pm Post subject: (No subject) |
|
|
drawfillbox(gx,gy,gx+1,gy+4,120)
Variable has no value
hmmm dont work for me just gives me that.[/quote] |
|
|
|
|
|
Maverick
|
Posted: Thu Dec 11, 2003 3:02 pm Post subject: (No subject) |
|
|
Doesn't work. Maybe you copied it out of the booklet wrong. |
|
|
|
|
|
DanShadow
|
Posted: Sat Dec 13, 2003 6:46 pm Post subject: (No subject) |
|
|
umm...I got the same error, but was smart enough just to make the variables (gx:=100,gy:=100)...and its...well ok. Its a pretty neat effect, except for the fact that the width of your grass thing is like 3 pixels...lol |
|
|
|
|
|
santabruzer
|
Posted: Sat Dec 13, 2003 9:11 pm Post subject: (No subject) |
|
|
yea, same problem.. maybe it's the program.. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
DanShadow
|
Posted: Sat Dec 13, 2003 9:25 pm Post subject: (No subject) |
|
|
Yeah, its definitely the program...he made a neat grass effect, but its 3 pixels wide...and his variables are empty, heh |
|
|
|
|
|
Thuged_Out_G
|
Posted: Sun Dec 14, 2003 1:33 am Post subject: (No subject) |
|
|
i dont see how that resembles grass...looks like a green line moving over a green box |
|
|
|
|
|
DanShadow
|
Posted: Tue Dec 16, 2003 11:55 am Post subject: (No subject) |
|
|
I think it looks like wind blowing through grass. (In some odd way). I also think that is what he was trying to protray in his program |
|
|
|
|
|
shorthair
|
Posted: Wed Jan 07, 2004 10:51 am Post subject: (No subject) |
|
|
I think that for a new programmer , its awsome , dont judge it from an experianced point of view , GOOD JOB man , keep up the good prograns , just make sure the code all works before you post it |
|
|
|
|
|
Schaef
|
Posted: Sun Jan 18, 2004 6:03 pm Post subject: (No subject) |
|
|
he didnt even put a value for his variables |
|
|
|
|
|
|
|