Raised This Month: $ Target: $400
 0% 

Problem orpheu CheckWinConditions


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Night90
Junior Member
Join Date: Jan 2016
Old 01-20-2016 , 17:25   Problem orpheu CheckWinConditions
Reply With Quote #1

Hello, i have problem with my plugin.

The error log is:

Code:
 [ORPHEU] Function "CHalfLifeMultiplay::CheckWinConditions" not found
 [AMXX] Run time error 10 (plugin "deathmatch.amxx") (native "OrpheuGetFunction") - debug not enabled!
I have server with linux and my version orpheu is v2.3a

Here is my file CheckWinConditions:
Code:
{
    "name"    : "CheckWinConditions",
    "class"   : "CGameRules",
    "library" : "mod",
    "indexes" : 
    [
        {
            "os"    : "windows",
            "mod"   : "cstrike",
            "value" : 65
        },
        {
            "os"    : "linux",
            "mod"   : "cstrike",
            "value" : 65
        }
    ]
}
Night90 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-20-2016 , 17:37   Re: Problem orpheu CheckWinConditions
Reply With Quote #2

Where is the config file? How hook is registered?
__________________
Arkshine is offline
Night90
Junior Member
Join Date: Jan 2016
Old 01-20-2016 , 18:00   Re: Problem orpheu CheckWinConditions
Reply With Quote #3

Sorry but my english is not very well.

Can you give me some tip what config and hook you want ?
Night90 is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 01-20-2016 , 18:12   Re: Problem orpheu CheckWinConditions
Reply With Quote #4

Arkshine asked for the location of CheckWinConditions file. It should be located in addons/amxmodx/configs/orpheu/virtualFunctions/CGameRules/ folder. Where is yours currently?
klippy is offline
Night90
Junior Member
Join Date: Jan 2016
Old 01-20-2016 , 18:15   Re: Problem orpheu CheckWinConditions
Reply With Quote #5

Quote:
Originally Posted by KliPPy View Post
Arkshine asked for the location of CheckWinConditions file. It should be located in addons/amxmodx/configs/orpheu/virtualFunctions/CGameRules/ folder. Where is yours currently?
The file is in that location.

Here is photo:
Night90 is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 01-20-2016 , 18:24   Re: Problem orpheu CheckWinConditions
Reply With Quote #6

I guess you are retrieving the function in your plugin in such way (or similar):
PHP Code:
OrpheuGetFunctionFromObject(g_pGameRules"CheckWinConditions""CHalfLifeMultiplay"); 
I think the last parameter has to be "CGameRules" instead of "CHalfLifeMultiplay". Not sure though, I don't know how Orpheu deals with class inheritance.
Show us how you retrieve the function in your code.

Last edited by klippy; 01-20-2016 at 18:25.
klippy is offline
Night90
Junior Member
Join Date: Jan 2016
Old 01-20-2016 , 18:29   Re: Problem orpheu CheckWinConditions
Reply With Quote #7

Here is

Code:
	OrpheuRegisterHook(OrpheuGetFunction("CheckMapConditions", "CHalfLifeMultiplay"), "game_blockConditions");
	OrpheuRegisterHook(OrpheuGetFunction("CheckWinConditions", "CHalfLifeMultiplay"), "game_blockConditions");
	OrpheuRegisterHook(OrpheuGetFunction("HasRoundTimeExpired", "CHalfLifeMultiplay"), "game_blockConditions");
Night90 is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 01-20-2016 , 18:32   Re: Problem orpheu CheckWinConditions
Reply With Quote #8

As I said, try "CGameRules" instead of "CHalfLifeMultiplay" in the second (CheckWinConditions) call.
klippy is offline
Night90
Junior Member
Join Date: Jan 2016
Old 01-21-2016 , 02:23   Re: Problem orpheu CheckWinConditions
Reply With Quote #9

It doesn't work, I tried it.
Code:
Function "CGameRules::CheckWinConditions" not found

Last edited by Night90; 01-21-2016 at 02:24.
Night90 is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 01-21-2016 , 05:06   Re: Problem orpheu CheckWinConditions
Reply With Quote #10

Oh wait, these are virtual functions, I don't think you should retrieve them like that, but rather from an object.
Look at this topic where Joaqim shows how to get a CGameRules object. You'll see that he uses OrpheuRegisterHookFromObject() to hook a virtual function.
klippy is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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