Jump to content

kspree.lua errors in log


metrizzle

Recommended Posts

Hi,

I just started a etded-server hobby instance based on silent and tried to get the kspree.lua
from 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 shows
me 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,

metrizzle

P.S. try it on ethorst.de.vu
 

Link to comment
Share on other sites

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 by metrizzle
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...