Rick Posted January 5, 2010 Share Posted January 5, 2010 I get this error on CreateHost() in the editor: attempt to call global 'CreateHost' (a nil value) Here is my call: object.host = CreateHost(0, object.port, object.playerCount) Even if my parameters were messed up it seems like the function CreateHost is nil from the editor. Is there some require I need? I also synced and still got this error. Quote Link to comment Share on other sites More sharing options...
VicToMeyeZR Posted January 5, 2010 Share Posted January 5, 2010 I would say that your not getting the values for object.port or object.playerCount without those being pulled in that would be false, and would make the count wrong on the function, so it would only see CreateHost(0) which is invalid, and would be nil.? Try changing to object.host=CreateHost(0, 81, 31) 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...
Rick Posted January 5, 2010 Author Share Posted January 5, 2010 I did that also with the same result. Quote Link to comment Share on other sites More sharing options...
VicToMeyeZR Posted January 5, 2010 Share Posted January 5, 2010 that is interesting.. And with just host= without object. It is the same? Wait, your calling this in the editor, not stand alone? 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...
VicToMeyeZR Posted January 5, 2010 Share Posted January 5, 2010 It appears the editor does not have the networking capabilty or the command set is different. That works when used with the engine.exe file, but not while in the editor. 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...
Rick Posted January 5, 2010 Author Share Posted January 5, 2010 If this is the case this is why when all this lua stuff first came out I was confused as to why there was an editor.exe and engine.exe. The editor should be able to turn into just running the game. This would correct the issue with having the 2 exe's getting out of sync and/or different syntax. Josh, any chance the editor can get networking commands? This would make debugging networking issues so much faster. Plus, I'm working on a networking object. Quote Link to comment Share on other sites More sharing options...
VicToMeyeZR Posted January 5, 2010 Share Posted January 5, 2010 Try only calling that while in GameMode in the editor. 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...
Rick Posted January 5, 2010 Author Share Posted January 5, 2010 That's actually where I was calling it from. In my Update() method I have an if statement which tells me if I'm in game mode or edit mode. Inside that statement I have another if statement which will branch off only once to do some init code when in game mode, since there isn't really another way to do that it seems. When I run in game mode no error happens, but when I exit game mode is when the lua editor pops up with the error above. Quote Link to comment Share on other sites More sharing options...
VicToMeyeZR Posted January 5, 2010 Share Posted January 5, 2010 Yeah, I get that also. Did you check the log to see if the host was created while in game mode? 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...
Rick Posted January 5, 2010 Author Share Posted January 5, 2010 I didn't. With the error I assume it was stopping at that code, but it just wasn't informing me about this stopping until I left game mode. Quote Link to comment Share on other sites More sharing options...
VicToMeyeZR Posted January 5, 2010 Share Posted January 5, 2010 Yeah, I think the assumption of not having any netwerk ability in the editor is correct. 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.