On line 19, I have my endif statement. it doesn't seem to be out of place, so i'm not sure what's wrong with it. i'm using DarkBASICPro with Dark Physics. Thanks in advance for any help. Here's my code:
sync on
sync rate 60
phy start
make object box 1, 30, 2, 30
phy make rigid body static box 1
position camera 0, 20, -10
do
if spacekey() = 1
for x = 2 to 102
make object box x, 1, 0.3, 0.5
position object x, RND(10)-5, x/2, RND(10)-5
color object x, RGB(RND(255), RND(255), RND(255))
phy make rigid body dynamic box x
Endif
sync
phy update
loop