• ents.FindInBox returns nothing (for print, at least)
    5 replies, posted
[lua]concommand.Add("boxprint", function() print(ents.FindInBox(Vector(-16380,-16380,-16380), Vector(16380,16380,16380))) end)[/lua] Typing the command does nothing. I am alive and obviously in the box. I just want to test ents.FindInBox. It is in init.lua. Help?
try PrintTable(ents.FindInBox(args)) instead, or use table tostring.
[QUOTE=BFG9000;46184512]try PrintTable(ents.FindInBox(args)) instead, or use table tostring.[/QUOTE] Changing print to PrintTable did nothing. Nor did using tabletostring EDIT: Seems to print only in server console. How would it be printed into the client's console?
[QUOTE=RonanZer0;46184650]Changing print to PrintTable did nothing. Nor did using tabletostring EDIT: Seems to print only in server console. How would it be printed into the client's console?[/QUOTE] Add the command clientside.
Tried it. Copy pasted the function into cl_init and changed the name from concommand name boxprint to boxprintcl. [lua]concommand.Add("boxprintcl", function() print(table.ToString( ents.FindInBox(Vector(-16380,-16380,-16380), Vector(16380,16380,16380)), "findinboxtest", 1 )); end)[/lua] [quote]Unknown command: boxprintcl[/quote] :suicide: Let me remind you that there are no errors in cl_init or init and everything else in cl_init is loading fine, including code further down than the concommand. I reconnected my client, changed the server map, hell I even restarted the server and still nothing!
-snip-
Sorry, you need to Log In to post a reply to this thread.