[R99]Corrupted file on duplicated behavior name

Bugs will be moved here once resolved.

Post » Fri Aug 10, 2012 11:43 pm

I just had a .capx crashed with this error:

Error loading project
Failed to open project '\\?\C:\Users\Morphine Central\AppData\Local\Temp\cap1O1VSW\Game.caproj':

behavior name already exists in object type
Under element: c2project \ families \ family \ behaviors \ behavior-type
Line 471, column 17

The file may be invalid. Try checking the file in a text editor (projects are saved in XML format).

How to reproduce:
1 - Create an sprite, give him a behavior.
2 - Create a family, put the sprite on it.
3 - Give the family the same behavior, with the same default name.

The behavior in this case was Rex_MoveTo, Ive solved the problem by editing the sprites behavior name to MoveTo2.

The likely reason the names where duplicated was because Ive copied the sprite object from another .capx.
Posts: 440
Reputation: 6,903

Post » Fri Aug 17, 2012 7:01 pm

I can't reproduce a problem with the exact steps you give, it correctly gives the family behavior name a 2 at the end and says the other name is taken. However if you rearrange the steps so you add the behavior to the family and the sprite separately, then add the sprite to the family, I can reproduce the error. It should prompt an error when adding to the family in the next build, preventing the problem from happening. Thanks for the report!
Scirra Founder
Posts: 25,284
Reputation: 200,847

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests