Author Topic: Use .dll and SetParameterGetBehaviour  (Read 2023 times)

Use .dll and SetParameterGetBehaviour
« on: August 01, 2013, 12:08:14 am »
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: [Select]
   
#  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"       );

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

Code: [Select]
EXPORT int getParam_Ac(CritterMutual& cr, uint)
{
return 1;
}

In the client_parameters, i have the same way to proceed that 2238
Code: [Select]
#include "../parameters/parameters.cpp"
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: [Select]
  SetParameterGetBehaviour( ST_ARMOR_CLASS, dllName + "getParam_Luck"       );
and it worked, because my current AC was 5 (i had 5 in luck).

Someone has the solution please?


Thanks!