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 / Any known issues with Clone Object?

Author
Message
Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 28th Aug 2003 20:33 Edited at: 28th Aug 2003 20:36
Does anyone know if there are any known issues with the Clone Object command? It's fundimental to my current project, but I'm getting an odd error with it.

My error message is the good old "Object already exists at line blah blah" error, but to debug and find out what object I'm trying to create twice I added a bit of code. Anyway, I have this ...



As you can see from that, if the object at ObjectNum actually exists, there's no way the program should be able to crash. It should enter the do loop before it tries to clone the object and display the number of the object it was about to try cloning.

But it doesnt. It skips passed the object exist() part and then runs the clone object line and tells me the object already exists.

Can't figure this one out. Is there a known bug?

EDIT:
To make it a bit clearer:
CLONE OBJECT 1000,ObjectNum
The clone object command clones the source object (1000) and makes a new object at position ObjectNum. As you can see in my code snippet, ObjectNum can't exist before the clone object command is run. It's not possible. So the error makes no sense to me!

Insiiiiiiiiiiiiiiiiiiiiiiiide!
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 28th Aug 2003 20:47 Edited at: 28th Aug 2003 20:50
Dont know of any...

Try this :




David T
Retired Moderator
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 28th Aug 2003 20:49
but the second parameter is source object, not the first

Theres no place like 127.0.0.1
There are 10 people in this world, those who understand binary and those who don't
Bus station = where bus stops Train station = where train stops. Workstation = ?
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 28th Aug 2003 20:51
Was going to add that...


David T
Retired Moderator
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 28th Aug 2003 20:59
I got this error for some reason they flipped the paramters in P4. Why?

Theres no place like 127.0.0.1
There are 10 people in this world, those who understand binary and those who don't
Bus station = where bus stops Train station = where train stops. Workstation = ?
Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 28th Aug 2003 21:05
They flipped the parametres but didn't update the help file??



I'm speechless.

It bet they pissed themselves laughing when they did that one.

Insiiiiiiiiiiiiiiiiiiiiiiiide!
David T
Retired Moderator
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 28th Aug 2003 21:22
Quote: "They flipped the parametres but didn't update the help file?? "


...but they did

Theres no place like 127.0.0.1
There are 10 people in this world, those who understand binary and those who don't
Bus station = where bus stops Train station = where train stops. Workstation = ?
Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 28th Aug 2003 22:44
I've downloaded upgrade 5 and the editor update from the same page. Do I need to update the help file seperately as well? If so, where's the link? If not, then it's not changed.

Insiiiiiiiiiiiiiiiiiiiiiiiide!
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 28th Aug 2003 23:16
No, the help file is updated with P5


Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 28th Aug 2003 23:28
Ahh, in which case, here's the help file quote then:

CLONE OBJECT
This command will clone the specified object and make an exact duplicate of it. Cloned objects do not
share any data allowing you to use the new object in any manner you wish.

SYNTAX
CLONE OBJECT Source Object, Object Number


So that could do with adjusting then, couldnt it?

Insiiiiiiiiiiiiiiiiiiiiiiiide!
David T
Retired Moderator
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 29th Aug 2003 00:59
No... here's my help file

Quote: "CLONE OBJECT
This command will clone the specified object and make an exact duplicate of it. Cloned objects do not
share any data allowing you to use the new object in any manner you wish.

SYNTAX
CLONE OBJECT Source Object, Object Number

RELATED INFO
BASIC3D Commands Menu
Index

EXAMPLE
View Showcase Example
View Usage Example"


Theres no place like 127.0.0.1
There are 10 people in this world, those who understand binary and those who don't
Bus station = where bus stops. Train station = where train stops. Workstation = ?
Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 29th Aug 2003 01:52
Muppet! You have the same help file as me. You have the source parameter listed before the object number, just like mine.

Clone Object Source Object, Object Number
The source parametre is the object you want to clone.
The object number is the new object you want to create.

Although the actual command requires the parameters in reverse order.
Clone Object Object Number, Source Object

So they need to fix the help file, cos that error really sucks, and parameters being the wrong way round in the help file isn't something you consider as an error when trying to debug your code.

Insiiiiiiiiiiiiiiiiiiiiiiiide!
indi
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 29th Aug 2003 07:08
cool clone object now clones all the limbs as well.

I did a test ages back and it didnt do it in older versions, perhaps I also missed the command switcheroo as well.

it works now anyway

http://www.lunarpixel.com
It's already tomorrow in Australia
Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 29th Aug 2003 14:19
Seems to be fast too. Now all I need is a faster delete object command!

Insiiiiiiiiiiiiiiiiiiiiiiiide!
David T
Retired Moderator
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 29th Aug 2003 14:51 Edited at: 29th Aug 2003 14:52
Quote: "Muppet! You have the same help file as me. You have the source parameter listed before the object number, just like mine."


What confused me was that the auto parameter help thing says source object last... (I never use the help for that sort of thing - I just use the status bar)



ps - I don't really care what the help says about clone object because I use instance object

Theres no place like 127.0.0.1
There are 10 people in this world, those who understand binary and those who don't
Bus station = where bus stops. Train station = where train stops. Workstation = ?
Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 29th Aug 2003 16:40
Ooo ... didn't even know that command existed. Must've been in a patch and I never saw it added. Doesn't help me though, cos I need to independently texture the objects in different ways.

Insiiiiiiiiiiiiiiiiiiiiiiiide!
indi
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 30th Aug 2003 17:35
making 4 trees as an example then cloning the 4 different types should work.

Its the way you do it that means so much to its usage.

http://www.lunarpixel.com
It's already tomorrow in Australia

Login to post a reply

Server time is: 2026-07-25 03:41:43
Your offset time is: 2026-07-25 03:41:43