Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google Log In with Steam Sign In
  • Create Account
Photo

kspree.lua errors in log

- - - - - et lua kspree

  • Please log in to reply
4 replies to this topic

#1
OFFLINE   metrizzle

metrizzle

    Newbie

  • Members
  • Pip
  • 3 posts
0
Unknown

Hi,

I just started a etded-server hobby instance based on silent and tried to get the kspree.lua
from http://mygamingtalk....load/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
 



#2
OFFLINE   gaoesa

gaoesa

    Advanced Member

  • Management
  • PipPipPipPip
  • 4391 posts
341
Will become famous
  • LocationFinland

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.



#3
OFFLINE   metrizzle

metrizzle

    Newbie

  • Members
  • Pip
  • 3 posts
0
Unknown

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, 18 December 2012 - 01:53 AM.


#4
OFFLINE   gaoesa

gaoesa

    Advanced Member

  • Management
  • PipPipPipPip
  • 4391 posts
341
Will become famous
  • LocationFinland

http://mygamingtalk..../Silent_Banners

 

 

"position" can have the values chat, cpm (popup), cp (center), bp (banner) or print (console)


#5
OFFLINE   metrizzle

metrizzle

    Newbie

  • Members
  • Pip
  • 3 posts
0
Unknown

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






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users