Page MenuHomeFeedback Tracker

vanilla scripts errors after being modded or modifed
New, NormalPublic

Description

This is a bit of a tricky one to explain, but I will do my best.

If you unpack the scripts.pbo file and run it in the root directory of the server, you're able to edit as long as the -filepatching parameter is set.
I understand this is expected behavior.

What I am noticing, though, is that if you add any lines or change anything in the class, even as simple as a Print("Hello World"); it seems to override some sort of error suppression that occurs on the vanilla scripts. This starts showing a lot of unsafe cast errors in the vanilla code.

Log E:\CCCPLogs\script.log started at 14.12. 04:29:01

SCRIPT       : Registered 371 temporary action enum(s), UAN==371
SCRIPT       : CreateGame()
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,197": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,207": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,208": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,209": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,215": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,216": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,217": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,218": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,219": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,220": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,223": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,225": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,226": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,227": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,228": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,232": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,233": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,239": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,240": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,241": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,242": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,243": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,244": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,258": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,661": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,1234": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,1244": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,1707": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,3029": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,3090": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,3130": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,3155": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,3184": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,3189": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,3337": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,3339": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,3352": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting
SCRIPT    (W): @"scripts/4_World/entities\manbase\playerbase.c,3766": Unsafe down-casting, use 'PlayerBase.Cast' for safe down-casting

Here is an example of some of the errors in the vanilla playerbase.c file.

These errors do not appear in the scripts.log file unless there is some form of modification being made to either the unpacked scripts folder, or adding a modded class over the top of the original. These are not errors in the mods, as the lines are very specifically referencing the vanilla pbo.

I think this might be some of the trouble you guys are having with debugging.

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Operating System Version
Latest
Category
Performance
Steps To Reproduce
  1. Unpack scripts.pbo and move folder to root of server directory
  2. add Print("Hello World"); to EEKilled() function in scripts\4_World\Entities\ManBase\PlayerBase.c line 438 below 'Print("EEKilled, you have died");' in the empty line.
  3. Run server and monitor scripts.log file to see unsafe casting errors.
Additional Information

Manually going through and editing the file with proper casting, improves server performance by a large chunk (50-200fps) and that is just one file.

Event Timeline