22.02.2015, 22:20
(
Последний раз редактировалось DRIFT_HUNTER; 23.02.2015 в 00:19.
)
Includes and their order
Both files have same hook method like these, and return 1 at the end
Error:
As error say its a function collision (same name). So what im doing wrong with hooks? (I know its me , i just cant find in documentation what it is)
EDIT: Problem solved.
I solved these by digging into y_hooks include topic. In case someone has same problem here is the problem.
We need to use:
Please notice H is uppercase and that one_ is actually a prefix (you can name it whatever you want)
Or (I will quote ****** answer on same problem)
pawn Код:
#include <a_samp>
#undef MAX_PLAYERS
#define MAX_PLAYERS 30 //Server Slots
#include <sscanf2>
#include <zcmd>
#include <YSI\y_iterate>
#include <YSI\y_va>
#include <YSI\y_hooks>
//#include <a_mysql>
#include <streamer>
#include <easyDialog>
//After few defines and variables
#include "TDM/TeamBalancer.pwn"
#include "TDM/TeamInfo.pwn"
pawn Код:
hook Test:OnPlayerRequestClass(playerid, classid)
{
return 1;
}
pawn Код:
TDM/TeamChoser.pwn(40) : error 021: symbol already defined: "@yH_PlayerRequestClass1"
TDM/TeamChoser.pwn(41) : error 021: symbol already defined: "@yH_PlayerRequestClass1"
EDIT: Problem solved.
I solved these by digging into y_hooks include topic. In case someone has same problem here is the problem.
We need to use:
pawn Код:
Hook:one_OnPlayerRequestClass(playerid, classid)
Or (I will quote ****** answer on same problem)