Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / runtie error 7130?

Author
Message
fungixl
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location:
Posted: 24th Sep 2006 16:49
im trying to use heightmaps for terrain, but i keep getting an error saying "terrain number illegal". here's the code:

make terrain 1,"C:\Documents and Settings\My Documents\My Pictures\terrainthing.bmp"
do
control camera using arrowkeys 0,1,1
cx#=camera position x(0)
cz#=camera position z(0)
if cx#<0.0 then cx#=0
if cx#>size# then cx#=size#
if cz#<0.0 then cz#=0
if cz#>size# then cz#=size#
position camera cx#,get terrain height(TerrainNumber,cx#,cz#)+5,cz#
if mouseclick()=1 then exit
loop
delete terrain 1


what am i doing wrong?
Ligh
21
Years of Service
User Offline
Joined: 16th Nov 2003
Location:
Posted: 24th Sep 2006 19:33
this line

position camera cx#,get terrain height(TerrainNumber,cx#,cz#)+5,cz#

is TerrainNumber set ?? if it is being set, check to see what number it actually is
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 25th Sep 2006 03:52
Variables dont just automatically know what value you want them to be. right after you create your terrain, use this:
TerrainNumber=1
And that should solve everything.

Login to post a reply

Server time is: 2024-11-26 09:29:47
Your offset time is: 2024-11-26 09:29:47