Amaroq7 / SPMod

SourcePawn Scripting Engine for Half-Life 1 based games
GNU General Public License v3.0
27 stars 12 forks source link

Suggestion: safe precache #15

Open voed opened 6 years ago

voed commented 6 years ago

Description

Check if file exists before precache, so server wont crash if user forgot to put resource in folder. But we need to stop plugin if resource not precached(SetFailState)

Other Comments

WPMGPRoSToTeMa commented 6 years ago

What is bad with crash? I have one idea - not all missed resources are displayed. But this solution also don't solve it.

voed commented 6 years ago

I think its wrong if plugin crashes server. Typical example: you are testing plugin locally, works fine, then you uploading it to dedicated server and server crashed. You need to enable condebug and check what happened, then you like "oh crap, i forgot to upload a model!" Example 2: you uploaded plugin, plugin crashed and said "you forgot to upload a model!"

WPMGPRoSToTeMa commented 6 years ago

You need to enable condebug

So, we can solve this problem by automatically forced crash log, isn't it?

you uploaded plugin, plugin crashed

And ... you didn't see that, because you just installed the plugin and forgot about it. This also is a problem, plugin crashes should be more noticeable, server crash is very noticeable, error messages in console aren't noticeable. Yeah server crash isn't the best way, but I don't know about the other noticeable ways.

voed commented 6 years ago

plugin crashes should be more noticeable

Notification to front menu that some plugin is crashed?