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 / Adding 3D text error

Author
Message
timer help
12
Years of Service
User Offline
Joined: 14th Jan 2014
Location:
Posted: 12th Mar 2014 17:43
So I found a tic-tac-toe game with this really cool 3D Text that I wanted to use for my game. So I got some of the code and used it in my game but I get the error "cannot close nest." Ive tried to fix it with ends, endifs, and loops but nothing seems to work. HNere is what I added:





Here is my whole game just incase the game has a problem:


This is the link that we got the code from:
http://www.thegamecreators.com/?m=codebase_view&i=13b9221919d776c8709b37467372c510

If you run the game, you'll most likely get the same error so I need some help fixing it. Please help!
Seditious
12
Years of Service
User Offline
Joined: 2nd Aug 2013
Location: France
Posted: 12th Mar 2014 17:44
You're missing "next k" before RETURN in the second snippet.
timer help
12
Years of Service
User Offline
Joined: 14th Jan 2014
Location:
Posted: 12th Mar 2014 17:51
Ive tried doing it and it almost worked, but now I have an illegal number:
ShellfishGames
13
Years of Service
User Offline
Joined: 6th Feb 2013
Location:
Posted: 12th Mar 2014 19:24
What do you mean by "now I have an illegal number"? What line exactly causes what exact error message?

Looking at the code, it seems as if you haven't defined TObj anywhere, so it's probably 0, hence make object cube called with that ID might throw such an error.

Also, I don't think you've taken all the code responsible for the 3D text. I don't see how the code you've posted here generates any 3D text at all - it's certainly related to that task, but for instance the for loop (the one that had a "next k" missing initially) doesn't really do anything right now. You should probably go back to the code where you got it from and copy the complete for block instead of just the first two lines.

timer help
12
Years of Service
User Offline
Joined: 14th Jan 2014
Location:
Posted: 13th Mar 2014 17:56
It says "Object Number Illegal at line 468. Runtime Error 7006"
Here is my line 468:



After I saw this, I tried adding more code to see if it worked:

I tried running it with the game and I have a new error that says:
Perimeter for 'Val' does no match 'string' at line 555.
This is my line 555
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 13th Mar 2014 21:30
Where is D$ defined and given values in your code?

Quote: "Perimeter for 'Val' does no match 'string' at line 555"


Parameter, surely?



Powered by Free Banners
timer help
12
Years of Service
User Offline
Joined: 14th Jan 2014
Location:
Posted: 14th Mar 2014 18:16
I have no idea, I tried adding some code to the game and it didn't work. I added as much as I could that the game would understand. If there isn't a way to add it to the code, is there any way I can still make my title have 3D text?
ShellfishGames
13
Years of Service
User Offline
Joined: 6th Feb 2013
Location:
Posted: 14th Mar 2014 18:25
d3d_func plugin offers a command "d3d_make_3dtext", which seems to suit your needs. I never used it, so I don't know how well it works, but it probably does the job. Just google "d3d func", you'll probably find it. Was created by a forum user named Cloggy as far as I remember.

Barry Pythagoras
12
Years of Service
User Offline
Joined: 14th Mar 2014
Location:
Posted: 25th Mar 2014 15:46
Yeah d3d works great!

Login to post a reply

Server time is: 2026-07-06 07:50:08
Your offset time is: 2026-07-06 07:50:08