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.

DarkBASIC Professional Discussion / Advanced Terrain Error 4

Author
Message
Diablo 3D
21
Years of Service
User Offline
Joined: 23rd May 2005
Location:
Posted: 15th Mar 2011 16:10
I've searched all through the forums and no-one seems to have the same problem I have. It's probably a simple solution, but here's the problem.

Using this code, I create my terrain:


When I first call the function where this code sits, the terrain is created fine. The next time I call it, it crashes with the very cryptic "Error 4".

Does anyone know what the hell is happening here?

Self Destruction Computer Entertainment
Mr Bigger
21
Years of Service
User Offline
Joined: 31st Jan 2005
Location: was here!
Posted: 15th Mar 2011 19:38
If i remember correctly that error means that the terrain already exists.

All thats needed to delete a terrain is this..


AMD 2600+/1GB ram/GeForce 6600oc 256MB/W2KPro/DBPro 6.6.b
Diablo 3D
21
Years of Service
User Offline
Joined: 23rd May 2005
Location:
Posted: 16th Mar 2011 10:23
@Mr Bigger

Thanks for the suggestion, but that didn't seem to work. :\

Self Destruction Computer Entertainment
Mr Bigger
21
Years of Service
User Offline
Joined: 31st Jan 2005
Location: was here!
Posted: 16th Mar 2011 12:20 Edited at: 16th Mar 2011 12:22
Quote: "Thanks for the suggestion, but that didn't seem to work. :\"


That's not telling me much so i'll try again.

Don't use the delete command on terrains. It doesn't work.
Check if the terrain object exists and if it does use the destroy terrain command only.

Like this



If it still doesn't work you may have another problem.

AMD 2600+/1GB ram/GeForce 6600oc 256MB/W2KPro/DBPro 6.6.b
Diablo 3D
21
Years of Service
User Offline
Joined: 23rd May 2005
Location:
Posted: 16th Mar 2011 12:33
Thanks Mr Bigger.

I copied the code and pasted it into my program, but I still got the Error 4 when I called the function again.

I'm new to AT so not really sure what's going on here

Self Destruction Computer Entertainment
Mr Bigger
21
Years of Service
User Offline
Joined: 31st Jan 2005
Location: was here!
Posted: 16th Mar 2011 12:54
Ok.

Make sure you use the update terrain command between calls to the function and sync.

AMD 2600+/1GB ram/GeForce 6600oc 256MB/W2KPro/DBPro 6.6.b
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 16th Mar 2011 13:08
I doubt that has anything to do with it.

The following snippet works fine for me:



I'd guess the problem is elsewhere in the code.
Diablo 3D
21
Years of Service
User Offline
Joined: 23rd May 2005
Location:
Posted: 16th Mar 2011 13:23
@Mr Bigger

Thanks for the tip. But again, Error 4.

@Green Gandalf

This code worked for me too... I'll look around and see if there's anything else in my code that could be causing the problem.

Self Destruction Computer Entertainment

Login to post a reply

Server time is: 2026-07-17 14:00:00
Your offset time is: 2026-07-17 14:00:00