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 / Pong tutorial command (I don't have yet question. where do I find it or get it)?

Author
Message
Ones and Zeros
16
Years of Service
User Offline
Joined: 7th Jun 2007
Location: Western NY
Posted: 24th Jan 2013 17:41
I've been watching and trying the pong tutorial by Dark Principles and in a function to create the objects he uses a variable called Ball.ID and sets it to 8.
Ball.ID = 8
Then he makes the object sphere Ball.ID,20

The problem I'm having is the field ID. Here is the error I get.
Could not find field 'id' in type 'ObjData' at line 97.

I've copied his code and everything works to this point so I'm guessing I need a plugin or different version of something.

I'm using DBP editor version jun 23 2010 and
DBP version 1.0761

I've tried the check for updates but it always says upto date even when I had the old version installed.

Any ideas?
zeroSlave
14
Years of Service
User Offline
Joined: 13th Jun 2009
Location: Springfield
Posted: 24th Jan 2013 20:07 Edited at: 24th Jan 2013 20:11
I'm not familiar with the tutorial, but your problem is probably coming from a UDT (User Defined Type)

You'll want to find something similar to:


When you set Ball as ObjData, you'll be able to change the following (according to the UDT I defined in the above code:


You could even put a UDT inside a UDT
Something like so:


Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid.
Ones and Zeros
16
Years of Service
User Offline
Joined: 7th Jun 2007
Location: Western NY
Posted: 24th Jan 2013 22:35
Thanks ZeroSlave. I thought I had rechecked but your comment about the UDT made me compare the tutorial to my notes to what I actually typed into the IDE. And sure enough I wrote the ID as Integer in my notes but missed it on the IDE. Thats what I get for doing it late at night. LOL
Ok I've seen post where someone said how to put the code snippets in but I'm not sure. Do I just select the code button and paste the code inside the replacing the word code with the actual code?
zeroSlave
14
Years of Service
User Offline
Joined: 13th Jun 2009
Location: Springfield
Posted: 25th Jan 2013 18:09
Glad it helped!

For the code snippet box, you'd do it like so:
[[/b]code]
all
your
code
here.
[[b]
/code]

Or you could type in your code then highlight it with your mouse and click the code button in the Forum Message text input box.

Or, you can click the code button before you type in the code, then click it again once your done putting the code in. I prefer the first method, myself. Just seems quicker for me.

Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid.

Login to post a reply

Server time is: 2024-04-24 20:30:33
Your offset time is: 2024-04-24 20:30:33