AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Bad, Bad Error (https://forums.alliedmods.net/showthread.php?t=62495)

shine771 10-28-2007 12:05

Bad, Bad Error
 
I wan't Fog in my ZS(Zombie Survival) server. But my plugins doesn't work...
CODE:
PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <engine>

#define PLUGIN "Fog"
#define VERSION "1.0"
#define AUTHOR "Sh!nE*"

new went

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
}

public 
plugin_precache()
{
    
went create_entity("env_fog")
    if(
went)
    {
        
entity_set_string(wentEV_SZ_classname"env_fog")
        
DispatchKeyValue(went,"density","0.001")
        
DispatchKeyValue(went,"rendercolor","116 137 147")
    }


ERROR:
Quote:

L 10/28/2007 - 17:49:41: Info (map "de_dust2") (logfile "error_102807.log")
L 10/28/2007 - 17:49:41: [ENGINE] Invalid entity 15
L 10/28/2007 - 17:49:41: [AMXX] Displaying debug trace (plugin "ws_fog.amxx")
L 10/28/2007 - 17:49:41: [AMXX] Run time error 10: native error (native "entity_set_string")
L 10/28/2007 - 17:49:41: [AMXX] [0] ws_fog.sma::plugin_precache (line 21)
I also try'd my old script:
PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <engine>

#define PLUGIN "Fog"
#define VERSION "1.0"
#define AUTHOR "Sh!nE*"

new went

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
}

public 
plugin_precache()
{
    
went engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"env_fog"))
    
DispatchKeyValue(went,"density","0.001")
    
DispatchKeyValue(went,"rendercolor","116 137 147")


ERROR:
Quote:

L 10/28/2007 - 17:58:00: Info (map "de_dust2") (logfile "error_102807.log")
L 10/28/2007 - 17:58:00: [ENGINE] Invalid entity 15
L 10/28/2007 - 17:58:00: [AMXX] Displaying debug trace (plugin "fog.amxx")
L 10/28/2007 - 17:58:00: [AMXX] Run time error 10: native error (native "DispatchKeyValue")
L 10/28/2007 - 17:58:00: [AMXX] [0] fog.sma::plugin_precache (line 19)
I reinstalled AMXX... - nothing... It worked a month ago! I don't know why it isn't working... the Error doesn't help me... I hope someone can.

Thanks.
Sorry for my english.

EDIT: But it works on my second server... even if i copied it's ADDONS... maybe it's cstrike problem...

Drak 10-28-2007 12:54

Re: Bad, Bad Error
 
Try:
Code:
public plugin_precache() {     went = create_entity("env_fog")     if(went)     {         entity_set_string(went, EV_SZ_classname, "env_fog")         DispatchKeyValue(went,"density","0.001")         DispatchKeyValue(went,"rendercolor","116 137 147")         DispatchSpawn(went)     } }

shine771 10-28-2007 14:23

Re: Bad, Bad Error
 
The same...

ConnorMcLeod 10-28-2007 14:38

Re: Bad, Bad Error
 
I've just made this sometime ago, just past some code i've found around there.
Just work fine :
Code:
#include <amxmodx> #include <engine> public plugin_init() {     register_plugin("Amx Fog","0.1","connor") } public plugin_precache() {     new fog = create_entity("env_fog")     DispatchKeyValue(fog,"density","0.001")     DispatchKeyValue(fog,"rendercolor","128 128 128") }

shine771 10-29-2007 09:04

Re: Bad, Bad Error
 
Doesn't work... all of those scripts are Good... It's amxx or CS problem... even my scripts are working on my soccerjam server... maybe someone knows what's the problem? I hope someone will help me... I C&P my soccerjam ADDONS to my ZS server... nothing... i tried reinstalling CS.. nothing... reinstalling AMXX... nothing...

Thanks.

EDIT: Problem solved... just copied SoccerJam server and added plugins... e.c... but maybe someone knows ... why it didn't work?


All times are GMT -4. The time now is 01:21.

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