Page 1 of 1

Damage display

PostPosted: Mon Apr 12, 2010 11:09 pm
by LuBJe
Hey guys,

I was using the very small Damag Dispay scritp by Haze!
Only thing I've changed is that I replace the hudhint with a centermsg.
This 26 line script works, but in console I keep getting erros as seen below.

Is there someone who could fix a script like this one? I'd be very thankful!

Traceback (most recent call last):
  File "C:\srcds\cstrike\addons\eventscripts\es.py", line 204, in triggerEvent
    self.EventListeners[eventname][listener](event_var)
  File "C:\srcds\cstrike\addons\eventscripts\damagedisplay\damagedisplay.py", li
ne 21, in player_hurt
    dmgdisplay_players[attacker] += damage
KeyError: '0'


Greetings,

LuBJe!

PostPosted: Mon Apr 12, 2010 11:13 pm
by Warren
Moved to the off-topic forum because this has no relation to GunGame, nor GunGame custom addon requests.

Image

PostPosted: Mon Apr 12, 2010 11:24 pm
by LuBJe
Thx Warren for that darn fast answer!

Sorry for the misplacement.

LuBJe

Edit: too bad, still getting error

Re:

PostPosted: Mon Apr 12, 2010 11:43 pm
by Warren
LuBJe wrote:too bad, still getting error

I don't think it could be the same error you posted.

Re: Damage display

PostPosted: Tue Apr 13, 2010 9:07 am
by LuBJe
You're right it isn't. See below for details.

(Just used the Paypal button to kinda thank you guys for all your work and the hours of fun you give us with your mod. Keep up the good work!)

[EventScripts] Loaded gungame51
Traceback (most recent call last):
  File "C:\srcds\cstrike\addons\eventscripts\es.py", line 339, in loadModuleAddo
n
    newaddon = __import__(importname)
  File "C:\srcds\cstrike\addons\eventscripts\damagedisplay\damagedisplay.py", li
ne 20
    if not int(attacker):
   ^
IndentationError: unexpected indent
Could not open script for addons/eventscripts/damagedisplay/es_damagedisplay.txt

  Error source (console): (no script)
Network: IP 192.168.1.120, mode MP, dedicated Yes, ports 27015 SV / 27005 CL

PostPosted: Tue Apr 13, 2010 10:05 am
by Warren
Make sure the indentation matches how it is in my picture. Also make sure that it is the same as the line above, meaning if it's 4 spaces, make it 4 spaces per indent, not a tab. ETC.

PostPosted: Tue Apr 13, 2010 12:36 pm
by LuBJe
Solved!!

Didn't know that spaces or tabs were of influence!

Thx Warren for helping me with this, eventhough it's not GunGame related.

LuBJe