Raised This Month: $ Target: $400
 0% 

[CORE] CreateOneForward not working


  
 
 
Thread Tools Display Modes
Author Message
Belsebub
Senior Member
Join Date: Feb 2005
Location: Sweden
Old 06-11-2006 , 03:34   [CORE] CreateOneForward not working
#1

I have made two small plugins to show this

Code:
#include <amxmodx> new g_forward public plugin_init() {     register_plugin("test", "1.0", "gaben") } public plugin_natives() {     register_native("test_createforward", "test_createforward_handler")     register_native("test_executeforward", "test_executeforward_handler") } //test_createforward(function[]) public test_createforward_handler(pluginid, numparams) {     new function[32]     get_string(1, function, 31)     g_forward = CreateOneForward(pluginid, function) } //test_executeforward() public test_executeforward_handler(pluginid, numparams) {     new retval     if (!ExecuteForward(g_forward, retval))         server_print("failed to execute forward") }
Code:
#include <amxmodx> native test_createforward(function[]) native test_executeforward() public plugin_init() {     register_plugin("test 2", "1.0", "gaben")     test_createforward("gaben")     test_executeforward() } public gaben() {     server_print("gaben executed") }

I tested theese on a clean 1.71 and they always print
Code:
failed to execute forward
Belsebub is offline
BAILOPAN
Join Date: Jan 2004
Old 06-11-2006 , 05:03  
#2

Thanks for finding this bug, it prevented CreateOneForward from crossing into other plugins (rather bad, eh?)

Just a note: ExecuteForward was returning -1 -- you should check that the return value is < 0 and bail out, that would have made this a tad easier to diagnose. I fixed this and a few other things and placed your script into /cvsroot/amxmodx/plugins/testsuite.
__________________
egg
BAILOPAN 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:43.


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