AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Native error: pev (https://forums.alliedmods.net/showthread.php?t=83007)

anakin_cstrike 01-02-2009 17:40

Native error: pev
 
Hello
I'm getting some errors at this line:
PHP Code:

public fw_thinkent )
{
    if( 
get_pcvar_numtoggle_plugin ) != 1)
        return 
FMRES_IGNORED;
        
    static 
classname32 ];
    
peventpev_classnamesizeof classname );
    
    
// this line
    
if( !strcmpclassname"hostage_entity" ) )
        return 
FMRES_IGNORED

I tried with equal but the same result.

Errors:
Code:

L 01/03/2009 - 00:38:32: [FAKEMETA] Invalid return type
L 01/03/2009 - 00:38:32: [AMXX] Displaying debug trace (plugin "test.amxx")
L 01/03/2009 - 00:38:32: [AMXX] Run time error 10: native error (native "pev")
L 01/03/2009 - 00:38:32: [AMXX]    [0] test.sma::fw_think (line 152)
L 01/03/2009 - 00:38:32: [META] ERROR: Plugin didn't set meta_result: fakemeta_amxx.dll:DispatchThink()


Exolent[jNr] 01-02-2009 17:52

Re: Native error: pev
 
PHP Code:

peventpev_classnamesizeof classname ); 

:arrow:
PHP Code:

peventpev_classnameclassnamesizeof classname ); 


Styles 01-02-2009 18:22

Re: Native error: pev
 
Does anakin_cstrike have amnesia?

anakin_cstrike 01-03-2009 05:19

Re: Native error: pev
 
Opsss:oops:
I'd been in amnesia when i posted that ^^
Thanks...

ConnorMcLeod 01-03-2009 05:46

Re: Native error: pev
 
Also, don't forget to check if the ent is valid ;)

anakin_cstrike 01-03-2009 08:21

Re: Native error: pev
 
Quote:

Originally Posted by ConnorMcLeod (Post 737478)
Also, don't forget to check if the ent is valid ;)

Yeah.

ConnorMcLeod 01-03-2009 08:25

Re: Native error: pev
 
Or use RegisterHam(Ham_Think, "hostage_entity", "Hostage_Think")

Then, no need to check if pev is valid, and no need to check classname.

anakin_cstrike 01-03-2009 09:32

Re: Native error: pev
 
I know that.
I tried that way but it prints me the message twice, don't sure why...the code was exactly like in a fm forward. However...
Also, about check classname, i did that.

Thanks for advices


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

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