Hello,
I'm trying to recompile my old plugins from 2012 with the new sourcemod but I have some issus.
I have made an extension that pick a random function. Plugins can register functions into this extension to get the randomness.
I have this header
Quote:
#if defined _random_func_included
#endinput
#endif
#define _random_func_included
funcenum RandomFunction
{
public(client, Float:pos[3])
};
/**
* @brief Add a function to the random list
*
* @param funcid_t Function handler
* @return int 0
*/
native rf_add_function(RandomFunction:hook);
/**
* @brief Remove a function from the random list
*
* @param funcid_t Function handler
* @return int 0
*/
native rf_remove_function(RandomFunction:hook);
/**
* @brief Execute one of the added function
*
* @param int client that call the function
* @param float postion vector where the function must do something
* @return int 0 on success, -1 if no function
*/
native rf_execute_function(client, Float:pos[3]);
|
The problem come from
Quote:
funcenum RandomFunction
{
public(client, Float:pos[3])
};
|
I get this error :
Ok, I changed by this:
Quote:
typeset RandomFunction
{
function void (int client, Float:pos[3])
};
|
but now I have this error:
Quote:
random_func.inc(9) : error 120: methodmap and class signatures must use new-style type declarations
|
Can't make it work. I don't want to recode my plugins too much, just porting with the new syntax. Any help ?
Thanks