help with some dr vip plugin
Hi guys, I'm using DeathRun VIP 3.1 bu TbagT, original thread https://forums.alliedmods.net/showthread.php?t=159675
I have tried to fix some errors what i get in my logs, but no way, so maybe someone of you guys know how to fix next: Code:
L 08/10/2013 - 00:22:07: Info (map "deathrun_easy_professional_xXx") (file "addons/amxmodx/logs/error_20130810.log")PHP Code:
PHP Code:
And last error is this PHP Code:
Thats it guys, I rly hope some of you know how to fix this, plugin working fine, but still makin me much logs, and i want to fix that, thanks in advance! |
Re: help with some dr vip plugin
You can't retrieve pcvars on plugin_precache() since precache occurs before plugin_init() where the cvars are registred as pcvars. You have to use regular cvars instead of pointers.
Also, there's no reason to use a pointer on a cvar that's used in precache anyway since it's only called once. If this is a cvar that enables a function that are in need of the precached file MAKE SURE that the file was precached before starting this function or force precache on all files to make it easy. Otherwise you would require a mapchange just to enable any of the cvars. I'll give you some examples in a minute. Here are some examples: This is BAD! This will cause problems: Code:
You really have to know what you're doing if you're using this way. It creates confusion and problems when people try to enable cvars since it requires a mapchange so that the required files can precache. Code:
Code:
In the event_deathmsg() the killer and victim are not always players. Therefor you must check if it actually is a player before you use the variables inside function that require players. The easiest way to check this is: Code:
Same thing goes for Hook_Deathmessage(). |
Re: help with some dr vip plugin
Thanks a lot dude, I will try to fix that when I wake up tomorrow, if I dont make this fine, I hope you will help me to make this plugin fine because im just a beginner with amxx. Thanks again.
|
Re: help with some dr vip plugin
Argh, I didn't fix this.
This is to advanced commands for beginner like me. If anybody can fix this, please attach .sma file. EDIT: Sorry for double post :S |
Re: help with some dr vip plugin
This fixes the precache issue in the most easy way:
Code:
You have 2 DeathMsg hooks that you can combine. First you remove this: Code:
Code:
And then you edit event_deathmsg() to this: Code:
Come back if you have further errors |
Re: help with some dr vip plugin
Thank you Black Rose, everything is ok now :)
Thanks one more time. |
| All times are GMT -4. The time now is 15:45. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.