Game Development Community

(Invalid t2dAnimationDatablock datablock) .t2d file issue, please help

by Jabawork · in Torque Game Builder · 02/20/2011 (7:44 pm) · 3 replies

HI,I've build a demo that require some animations inside, the project works fine at the first time I edited it, and the console didn't show up any error message last time. Then while I try to run the project next day, it came with a blank black screen with a error message in the console : "Invalid t2dAnimationDatablock datablock" in the .t2d file.

Here is the datablock that comes with the error message:

new t2dAnimatedSprite() {
      animationName = "employeeAnimationAnimation";
      canSaveDynamicFields = "1";
      Position = "20.752 -7.995";
      size = "7.031 9.570";
         mountID = "3";
   };


Did I setup something wrong?
Please help.



#1
02/21/2011 (5:38 am)
It means that employeeAnimationAnimation was not set up properly (it errored) or it wasn't exec'ed at all.

Look to where you set the employeeAnimationAnimation datablock up and make sure it is correct. Look through the console.log file to see if the file containing it was execed (there will be a line in the console.log) ...

i don't really use the Game Builder part of TGB (I do everything in code) but I believe your datablocks are stored in the automatically generated datablocks.cs file. You may need to delete the dso file to get it to read the new one if you generate a new one.

Hope this helps. Sorry I couldn't help more with the Game Builder side of it. (In my opinion, you would probably benefit more from exploring the code side anyways)
#2
02/21/2011 (7:38 pm)
Yes this is where the problem is, I changed the animation's name and the engine can't locate the file, better use the default name that engine gives next time. :)

Thanks! Your reply really help!
#3
02/22/2011 (5:08 am)
Glad I could help :)