Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: error compiling :[  (Read 3327 times)

0 Members and 1 Guest are viewing this topic.

ben

  • Guest
error compiling :[
« on: July 23, 2007, 04:00:23 AM »

i type in make modules (in anope-1.7.19)
and it says:
ircd_netserv.c:6: error: syntax error before '{' token

--------------
Error:
int AnopeInit(int argc, char **argv)
{
    EvtHook *hook;
--------------

File:

#include <module.h>

int my_save(int ac, char **av)

int AnopeInit(int argc, char **argv)
{
    EvtHook *hook;

    hook = createEventHook(EVENT_NEWNICK, my_save);
    if (moduleAddEventHook(hook) != MOD_ERR_OK) {
        alog("Can't hook to EVENT_NEWNICK event");
        return MOD_STOP;
     }
    return MOD_CONT;
}

note: this is only a little part of the file
i have the rest of the:
int my_save(int ac, char **av)
done

i have the event hook set to notice new nick but i didnt think it would work but the problem is not this surpiringly
Logged

ben

  • Guest
(No subject)
« Reply #1 on: July 23, 2007, 04:58:50 AM »

nevermind i figured it out along with a bunch of other errors and for the record connection noticing is very hard to see i sugest if you want to do something like this you use privmsg
Logged

katsklaw

  • Guest
(No subject)
« Reply #2 on: July 23, 2007, 12:19:36 PM »

or just use LOGONNEWS since that is exactly what it's designed for.
Logged

ben

  • Guest
(No subject)
« Reply #3 on: July 23, 2007, 09:56:31 PM »

well actually theres nothing really about it, its a welcome message not a new item :[
does it really matter, its just a test run so i can learn how to do anope modules :D
by the way, it works

p.s. you might want to lock/delete this topic because it has no further use if the problem has been solved without the solution being posted
Logged
Pages: [1]   Go Up