Damage display

Discussion relating to anything. (Keep it clean.)

Damage display

Postby LuBJe » Mon Apr 12, 2010 11:09 pm

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!
LuBJe

Private
Private
User avatar
 
Posts: 12
Joined: Fri Jan 08, 2010 4:52 pm
Steam Friends Name: lubje

Postby Warren » Mon Apr 12, 2010 11:13 pm

Moved to the off-topic forum because this has no relation to GunGame, nor GunGame custom addon requests.

Image
Warren

Site Admin
Site Admin
 
Posts: 772
Joined: Fri Sep 05, 2008 2:59 am
Location: Boston, MA
Xfire Name: WMA9000

Postby LuBJe » Mon Apr 12, 2010 11:24 pm

Thx Warren for that darn fast answer!

Sorry for the misplacement.

LuBJe

Edit: too bad, still getting error
LuBJe

Private
Private
User avatar
 
Posts: 12
Joined: Fri Jan 08, 2010 4:52 pm
Steam Friends Name: lubje

Re:

Postby Warren » Mon Apr 12, 2010 11:43 pm

LuBJe wrote:too bad, still getting error

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

Site Admin
Site Admin
 
Posts: 772
Joined: Fri Sep 05, 2008 2:59 am
Location: Boston, MA
Xfire Name: WMA9000

Re: Damage display

Postby LuBJe » Tue Apr 13, 2010 9:07 am

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
LuBJe

Private
Private
User avatar
 
Posts: 12
Joined: Fri Jan 08, 2010 4:52 pm
Steam Friends Name: lubje

Postby Warren » Tue Apr 13, 2010 10:05 am

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.
Warren

Site Admin
Site Admin
 
Posts: 772
Joined: Fri Sep 05, 2008 2:59 am
Location: Boston, MA
Xfire Name: WMA9000

Postby LuBJe » Tue Apr 13, 2010 12:36 pm

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
LuBJe

Private
Private
User avatar
 
Posts: 12
Joined: Fri Jan 08, 2010 4:52 pm
Steam Friends Name: lubje



Return to Off Topic

Who is online

Users browsing this forum: No registered users and 13 guests