AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   My server crashes when function is called with orpheu (https://forums.alliedmods.net/showthread.php?t=173522)

shinoda 12-06-2011 13:28

My server crashes when function is called with orpheu
 
I'm hooking StartObserver function, but my server crashes when is called.

My code:
PHP Code:

#include <amxmodx>
#include <orpheu>

public plugin_init()
{
    
OrpheuRegisterHookOrpheuGetFunction("StartObserver""CBasePlayer"), "OnStartObserver"OrpheuHookPre )
}

public 
OnStartObserver( const id, const Float:vecOrigin[3], const Float:vecViewAngle[3] )
{
    
server_print"Testing" )


Sig in orpheu/functions/CBasePlayer
Code:

{
        "name"      : "StartObserver",
        "class"    : "CBasePlayer",
        "library"  : "mod",
        "arguments" :
        [
                {
                        "type" : "Vector",
                        "type" : "Vector"
                }
        ],
        "return" :
        {
                "type" : "int"
        },
        "identifiers" :
        [
                {
                        "os"    : "windows",
                        "mod"  : "valve",
                        "value" : [0x53,0x56,0x8B,0xF1,0x57,0x33,"*",0x8B,0x46,"*",0x57,0x83,0xC0,"*",0x50,0x6A]
                },
                {
                        "os"    : "linux",
                        "mod"  : "valve",
                        "value" : "StartObserver__11CBasePlayerG6VectorT1"
                }
        ]
}

Output
Code:

Orpheu functions search started.

        Parsing functions started.
                Parsing file "InstallGameRules" started
                                Function is updated
                Parsing file "InstallGameRules" ended
                Parsing file "InstallGameRules_tfc" started
                                Argument type "char *" validated
                                Return type "CHalfLifeMultiplay *" validated
                Parsing file "InstallGameRules_tfc" ended
                Parsing file "FireTargets" started
                                Function is updated
                Parsing file "FireTargets" ended
                Parsing folder "CRuleEntity" started
                        Parsing file "CanFireForActivator" started
                                Function is updated
                        Parsing file "CanFireForActivator" ended
                Parsing folder "CRuleEntity" ended
                Parsing folder "CGamePlayerTeam" started
                        Parsing file "TargetTeamName" started
                                Function is updated
                        Parsing file "TargetTeamName" ended
                Parsing folder "CGamePlayerTeam" ended
                Parsing folder "CBasePlayer" started
                        Parsing file "StartObserver" started
                                Function is updated
                        Parsing file "StartObserver" ended
                Parsing folder "CBasePlayer" ended

        Parsing functions ended.

Orpheu functions search ended.


Arkshine 12-06-2011 15:39

Re: My server crashes when function is called with orpheu
 
You can't. Vector -alone- is not supported.

shinoda 12-06-2011 20:52

Re: My server crashes when function is called with orpheu
 
Oh, I forgot this list:
Code:

    "bool"
    "byte"
    "long"
    "CBaseEntity *"
    "char *"
    "edict_s *"
    "float"
    "Vector *"
    "CMBaseMonster *"
    "char"
    "short"
    "entvars_s *"

Thanks Arkshine.


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

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