metrizzle Posted December 16, 2012 Share Posted December 16, 2012 Hi,I just started a etded-server hobby instance based on silent and tried to get the kspree.luafrom http://mygamingtalk.com/forums/files/download/22-kspree/ to run.The startup looks okay and I can stat the module with "/lua_status" in game.But the killing sprees won't get announced. Instead the server.log showsme following error. 6:21 Lua API: et_Obituary error running lua script: [string "kspree.lua"]:430: tried to get invalid gentity field "sess.sessionTeam" 7:45 Lua API: et_Obituary error running lua script: [string "kspree.lua"]:430: tried to get invalid gentity field "sess.sessionTeam" The suspicious lines in the kspree.lua 427 function et_Obituary(victim, killer, mod) 428 if gamestate == 0 then 429 local v_teamid = et.gentity_get(victim, "sess.sessionTeam") 430 local k_teamid = et.gentity_get(killer, "sess.sessionTeam") 431 local weapon = et.gentity_get(victim, "s.weapon") Now it doesn't really make sense that the code does work for the victim but not for the killer.So I guess the errors are not immediately related to the script..But that's just my guess and I am bit puzzled on this one.Any ideas suggestions?Regards,metrizzleP.S. try it on ethorst.de.vu Quote Link to comment Share on other sites More sharing options...
Management gaoesa Posted December 16, 2012 Management Share Posted December 16, 2012 It is possible that the killer is not a player. You should check that the killer is not 1022, or more safely that the value is below 64. metrizzle 1 Quote Link to comment Share on other sites More sharing options...
metrizzle Posted December 18, 2012 Author Share Posted December 18, 2012 (edited) Hi,we finally got to work. The trouble was our banner position configuration that we used e.g. "b 8", "b 72".The bitmap as described in the old ETPro documentation (and the original source of the script) did not work for us.As far as I understand it you cannot print to clients screen like: et.trap_SendServerCommand( id, "b 128 \" "..foo.." \"\n") using silent mod 0.6.1 and the dynamic lua api.Currently we have follwoing working banner positions: kmulti_pos = "cp" -- multi + megakill - position kmonster_pos = "cp" -- ultra + monster + ludicrous + holy shit - position kmultitk_pos = "cp" -- multi TK - position kspree_pos = "bp" -- killing spree position kspree_color = "5" -- killing spree color And the corresponding sayClients function: function sayClients(pos, msg) local message = pos.." \""..msg.."^7\n\"" et.G_Printf("kspree.lua: sayClients with message: \"%s\"", message) table.foreach(client_msg, function(id, msg_ok) if msg_ok then et.trap_SendServerCommand(id, message) end end ) end What options are there for printing to clients screen using "et.trap_SendServerCommand"?Any documentation hint? Can't find anything. Cheers,metrizzle Edited December 18, 2012 by metrizzle Quote Link to comment Share on other sites More sharing options...
Management gaoesa Posted December 18, 2012 Management Share Posted December 18, 2012 http://mygamingtalk.com/wiki/index.php/Silent_Banners "position" can have the values chat, cpm (popup), cp (center), bp (banner) or print (console) Quote Link to comment Share on other sites More sharing options...
metrizzle Posted December 18, 2012 Author Share Posted December 18, 2012 Ah ok. Read the documentation earlier. But I wasnt sure if I can use this together with "et.trap_SendServerCommand". Thx and best regards, metrizzle Quote 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.