FOnline Development > Questions and Answers

Use .dll and SetParameterGetBehaviour

(1/1)

Benf:
Hello!

I have a problem with dll files. I managed to do my own parameters.dll and client_parameters.dll, and added somes functions inside. My objective is to use one of this function inside the config.fos file. (i work from the TLA sdk, so these files don't exit):


--- Code: ---   
#  ifndef __CLIENT
    string dllName = "fonline_tla.dll@";
string dllName2 = "parameters.dll@";
    #  endif
    #  ifdef __CLIENT
    string dllName = "fonline_tla_client.dll@";
string dllName2 = "client_parameters.dll@";
    #  endif
    SetParameterGetBehaviour( ST_ARMOR_CLASS, dllName2 + "getParam_Ac"       );
--- End code ---

So, in parameters.dll, i have the function getParam_Ac. To test it, this function is the following:


--- Code: ---EXPORT int getParam_Ac(CritterMutual& cr, uint)
{
return 1;
}
--- End code ---

In the client_parameters, i have the same way to proceed that 2238

--- Code: ---#include "../parameters/parameters.cpp"
--- End code ---

So, normally, if i go in the game, i must have a Armor class set to 1, but not. The function is effectively recognize, because i don't have message error when i start the server (i have one if i call a non-existent function).

So i don't know what i did wrong :/ I tried just to see what happend when i did this:
 
--- Code: ---  SetParameterGetBehaviour( ST_ARMOR_CLASS, dllName + "getParam_Luck"       );
--- End code ---

and it worked, because my current AC was 5 (i had 5 in luck).

Someone has the solution please?


Thanks!

Navigation

[0] Message Index

Go to full version