y_hooks
#1

Hi, Im creating a new TDM mode, and a new .pwn for each system, because its better for me.

Im using y_hooks, but when I compiling main .pwn, I getting

"invalid function or declaration"

at callbacks first line..

example

Hook:maps_public OnGameModeExit()

Hook:maps_public OnGameModeInit()

and so on..
Reply
#2

You have to use the Module_OnSomeCallback(params) syntax:

pawn Код:
Hook:Maps_OnGameModeExit(){
// code
}
Reply
#3

Noup, dont work
Reply
#4

Post whole code please
Reply
#5

Omg, epic fail. The problem was in public, I dont saw it

Ah, now another problem in first line of this:

pawn Код:
new Maps[5][MapsDB] =
{
    {"fy_snow", 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1, 0, 1},
    {"de_dust2", 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1, 1, 1},
    {"aim_headshot", 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1, 1, 1},
    {"de_dustyworld", 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1, 1, 1},
    {"fy_aztkill", 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1, 1, 1},
};
Reply
#6

pawn Код:
new Maps[5][15] =
{
    {"fy_snow", 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1, 0, 1},
    {"de_dust2", 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1, 1, 1},
    {"aim_headshot", 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1, 1, 1},
    {"de_dustyworld", 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1, 1, 1},
    {"fy_aztkill", 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1, 1, 1},
};
Reply
#7

Im just getting a lot of warnings and some errors.
Reply
#8

How did you define MapsDB.
Reply
#9

Its an enumerator.
Reply
#10

Bump
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)