Raised This Month: $32 Target: $400
 8% 

[L4D2] Vscripts / VSLib ERROR (the index 'Z_SURVIVOR' does not exist)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Tank Rush
Senior Member
Join Date: May 2019
Location: Argentina
Old 09-15-2020 , 15:32   [L4D2] Vscripts / VSLib ERROR (the index 'Z_SURVIVOR' does not exist)
Reply With Quote #1

I have a plugin that works as follows:
Unlock the last safe door, a count starts, if you don't get to the safe room on time the door will close and you will die!

My error:
HUD countdown counter does not exist. View image
The capture I took from a server that is not mine, but no I will not upload the plugin because it is private.

In "logs" no errors are recorded, I only get this in the console:

Code:
AN ERROR HAS OCCURED [the index 'Z_SURVIVOR' does not exist]

CALLSTACK
*FUNCTION [GetSurvivorCharacter()] c:/games/steam/steamapps/common/left 4 dead 2/left4dead2/scripts/vscripts/VSLib/Entity.nut line [3376]
*FUNCTION [unknown()] c:/games/steam/steamapps/common/left 4 dead 2/left4dead2/scripts/vscripts/VSLib/EasyLogic.nut line [1996]
*FUNCTION [__RunEventCallbacks()] unnamed line [211]
*FUNCTION [__RunGameEventCallbacks()] unnamed line [218]

LOCALS
[this] INSTANCE
[_id] 4
[ents] TABLE
[params] TABLE
[this] TABLE
[funcName] "OnGameEvent_player_spawn"
[idx] 0
[useTable] TABLE
[bWarnIfMissing] false
[globalTableName] "GameEventCallbacks"
[prefix] "OnGameEvent_"
[params] TABLE
[event] "player_spawn"
[this] TABLE
[params] TABLE
[event] "player_spawn"
[this] TABLE
Even so the plugin works, if you don't get to the safe room on time you will die, what does not work is the HUD counter
I just want to know why I get that error in the console and what I did wrong.
__________________
Sorry i don't speak english very well

--->My name is Source and I'm on Steam<---
Discord: Source#9382

Last edited by Tank Rush; 09-15-2020 at 15:41.
Tank Rush is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 09-15-2020 , 22:03   Re: [L4D2] Vscripts / VSLib ERROR (the index 'Z_SURVIVOR' does not exist)
Reply With Quote #2

Without sharing the plugin or the VScript code probably nobody will be able to help you.

But doing some search seems that u need to have "VSLib"

Here is a post with a similar issue:
https://forums.alliedmods.net/showthread.php?p=2669741

You can try to download BHaType VSLib version here:
https://forums.alliedmods.net/attach...2&d=1565713633
__________________
Marttt is offline
Tank Rush
Senior Member
Join Date: May 2019
Location: Argentina
Old 09-16-2020 , 11:27   Re: [L4D2] Vscripts / VSLib ERROR (the index 'Z_SURVIVOR' does not exist)
Reply With Quote #3

Quote:
Originally Posted by Marttt View Post
Without sharing the plugin or the VScript code probably nobody will be able to help you.

But doing some search seems that u need to have "VSLib"

Here is a post with a similar issue:
https://forums.alliedmods.net/showthread.php?p=2669741
The Vscripts if I can share it:
Attached Files
File Type: zip VSLib.zip (107.7 KB, 110 views)
__________________
Sorry i don't speak english very well

--->My name is Source and I'm on Steam<---
Discord: Source#9382

Last edited by Tank Rush; 09-16-2020 at 11:54.
Tank Rush is offline
Tank Rush
Senior Member
Join Date: May 2019
Location: Argentina
Old 09-16-2020 , 11:58   Re: [L4D2] Vscripts / VSLib ERROR (the index 'Z_SURVIVOR' does not exist)
Reply With Quote #4

Quote:
Originally Posted by Marttt View Post
You can try to download BHaType VSLib version here:
https://forums.alliedmods.net/attach...2&d=1565713633
I have tried the VSLib version of BHaType, the error is no longer showing on the console, but still the HUD countdown counter still does not show up.
__________________
Sorry i don't speak english very well

--->My name is Source and I'm on Steam<---
Discord: Source#9382
Tank Rush is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 09-17-2020 , 20:46   Re: [L4D2] Vscripts / VSLib ERROR (the index 'Z_SURVIVOR' does not exist)
Reply With Quote #5

I'm not good at the HUD thing but I already had a problem with some addons from workshop breaking some vscripts (like admin system from workshop).
I don't know if is the case, but if you have a similar scenario try to test in a clean enviroment (no addons no additional plugins)
__________________
Marttt is offline
jeremyvillanueva
AlliedModders Donor
Join Date: Jan 2021
Location: dcord:Jeremy333#7632
Old 03-02-2021 , 14:17   Re: [L4D2] Vscripts / VSLib ERROR (the index 'Z_SURVIVOR' does not exist)
Reply With Quote #6

Hi, I got the same problem
You can assign the variables on a higher scope
like this:

getconsttable()["Z_WITCH"] <- 7;
getconsttable()["Z_TANK"] <- 8;
getconsttable()["Z_SURVIVOR"] <- 9;
getconsttable()["Z_MOB"] <- 10;
getconsttable()["Z_WITCH_BRIDE"] <- 11;
::Z_TANK <- 8;
::Z_SURVIVOR <- 9;
So they would work, I'm looking into this
jeremyvillanueva is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:36.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode