Game Development Community

Strange bug..

by Will O-Reagan · in Torque X 2D · 06/24/2007 (12:36 am) · 0 replies

I'm doing a container search as I have been for the past month, but with the new TX i got this different result...


this is my old code...

else if (nObj.TestObjectType(TorqueObjectDatabase.Instance.GetObjectType("shopType")))
                            {
                                    _used = true;
                                    shop _shop = nObj.Components.FindComponent<shop>();
                                    _shop._createTransaction();
                            }

this is my post 1.0 build code

else if (nObj.TestObjectType(TorqueObjectDatabase.Instance.GetObjectType("shopType")))
                            {
                                if (nObj.Name != "")
                                {
                                    _used = true;
                                    shop _shop = nObj.Components.FindComponent<shop>();
                                    _shop._createTransaction();
                                }
                            }

You see my problem? now its finding another object that doesn't exist(as far as i know), I have to put in a new qualifier statement or I'll get an error .

About the author

I have a degree in dramatic art, and literature, from UC Santa Barbara. I've worked for a few studios, also at Animax Ent in 2008, and some smaller studios. Currently studying Computer Science at CSU Channel Islands.