Raised This Month: $51 Target: $400
 12% 

Solved Problem with callfunc_push_intrf


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
_McHappy
New Member
Join Date: Jul 2017
Old 10-07-2018 , 04:27   Problem with callfunc_push_intrf
Reply With Quote #1

Hi.
I have a problem with callfunc_push_intrf. The function is not working as expected - just take a look at this plugin:

Code:
#include <amxmodx>

public plugin_init()
{
	register_plugin("Tests", "1.0", "Nvm");

	register_concmd("test_intref", "test_intref");
}

public test_intref(id)
{
	new testing_param;

	if(callfunc_begin("test_func") == 1)
	{
		callfunc_push_intrf(testing_param);
		callfunc_end();

		// console output: "test_intref - testing_param value: 0"
		log_amx("test_intref - testing_param value: %d", testing_param);
	}
}

public test_func(param)
{
	// console output: "test_func - param value (pre): 628"
	log_amx("test_func - param value (pre): %d", param);

	param = 5;

	// console output: "test_func - param value (post): 5"
	log_amx("test_func - param value (post): %d", param);
}
Tested on fresh HLDS (updated via SteamCMD) and ReHLDS with metamod/metamod-r and AMXX 1.8.2/1.9.0-git5229 on windows 10 64bit.

Any ideas why does it behave like that?
Regards.

Last edited by _McHappy; 10-07-2018 at 09:29.
_McHappy is offline
 



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 05:41.


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