Rick Posted February 15, 2010 Share Posted February 15, 2010 The following results in a C stack overflow error. I wish to store these keys in the model object. I tried :GetKey() also with the same error. function class:CreateObject(model) local object=self.super:CreateObject(model) object.model = model function object:GetKey(key,value) if key == "color" then return GetEntityKey(object.model, "color", "") -- C stack overflow elseif key == "type" then return GetEntityKey(object.model, "type", "") -- C stack overflow else return self.super:GetKey(key,value) end return value end Quote Link to comment Share on other sites More sharing options...
Rick Posted February 15, 2010 Author Share Posted February 15, 2010 Ah I see. I'm entering the GetKey() method by calling it inside there. It's an endless loop. Duh! Quote Link to comment Share on other sites More sharing options...
VicToMeyeZR Posted February 15, 2010 Share Posted February 15, 2010 lol. Quote AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.