Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Many thanks for the explanation, I hope you have a fantastic night and good fortune on future projects!
So yeah, unless the script doesn't work, you don't have to worry about the errors.
When a player takes damage:
- Check which player it was who took the damage
- Check what damage type that player took. Every damage type has a corresponding number
- If the damage type equals 128 (which it should if a common infected hit the player):
-- Continue with the rest of the script
function OnGameEvent_player_hurt(event)
{
local victim = GetPlayerFromUserID(event.userid);
local damagetype = event.type;
if(damagetype == 128)
I think this is what causes error problems on my computer, as in the console it show it as "type is not a valid" something of this sort. I was wondering if you can explain what this function does and maybe review it to see if it happens on your end too.
Thank you for your time! :-3
AN ERROR HAS OCCURED [the index 'type' does not exist]
CALLSTACK
*FUNCTION [OnGameEvent_player_hurt()] c:/program files (x86)/steam/steamapps/common/left 4 dead 2/left4dead2/addons/workshop/3396548149.vpk/scripts/vscripts/director_base_addon.nut line [120]
*FUNCTION [__RunEventCallbacks()] unnamed line [211]
*FUNCTION [__RunGameEventCallbacks()] unnamed line [218]
LOCALS
[victim] INSTANCE
[event] TABLE
[this] TABLE
[funcName] "OnGameEvent_player_hurt"
[idx] 11
[useTable] TABLE
[bWarnIfMissing] true
[globalTableName] "GameEventCallbacks"
[prefix] "OnGameEvent_"
[params] TABLE
[event] "player_hurt"
[this] TABLE
[params] TABLE
[event] "player_hurt"
[this] TABLE