13.05.2014, 14:00
I have some problems
PHP код:
C:\Users\Arlind\Desktop\fsdf\filterscripts\Project.pwn(2020) : error 017: undefined symbol "IRC_SetIntData"
C:\Users\Arlind\Desktop\fsdf\filterscripts\Project.pwn(2024) : error 017: undefined symbol "IRC_SetIntData"
C:\Users\Arlind\Desktop\fsdf\filterscripts\Project.pwn(11081) : error 025: function heading differs from prototype
C:\Users\Arlind\Desktop\fsdf\filterscripts\Project.pwn(11097) : error 025: function heading differs from prototype
C:\Users\Arlind\Desktop\fsdf\filterscripts\Project.pwn(11110) : warning 235: public function lacks forward declaration (symbol "IRC_OnConnectAttempt")
C:\Users\Arlind\Desktop\fsdf\filterscripts\Project.pwn(11121) : warning 235: public function lacks forward declaration (symbol "IRC_OnConnectAttemptFail")
C:\Users\Arlind\Desktop\fsdf\filterscripts\Project.pwn(11151) : warning 235: public function lacks forward declaration (symbol "IRC_OnInvitedToChannel")
C:\Users\Arlind\Desktop\fsdf\filterscripts\Project.pwn(11165) : warning 235: public function lacks forward declaration (symbol "IRC_OnKickedFromChannel")
C:\Users\Arlind\Desktop\fsdf\filterscripts\Project.pwn(11190) : warning 235: public function lacks forward declaration (symbol "IRC_OnUserKickedFromChannel")
C:\Users\Arlind\Desktop\fsdf\filterscripts\Project.pwn(11235) : warning 235: public function lacks forward declaration (symbol "IRC_OnUserRequestCTCP")
C:\Users\Arlind\Desktop\fsdf\filterscripts\Project.pwn(11241) : error 017: undefined symbol "IRC_ReplyCTCP"
C:\Users\Arlind\Desktop\fsdf\filterscripts\Project.pwn(11246) : warning 235: public function lacks forward declaration (symbol "IRC_OnUserReplyCTCP")
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
PHP код:
public IRC_OnConnect(botid, ip[], port)
{
printf("*** IRC_OnConnect: Bot ID %d connected to %s:%d", botid, ip, port);
// Join the channel
IRC_JoinChannel(botid, IRC_CHANNEL);
// Add the bot to the group
IRC_AddToGroup(groupID, botid);
return 1;
}
/*
This callback is executed whenever a current connection is closed. The
plugin may automatically attempt to reconnect per user settings. IRC_Quit
may be called at any time to stop the reconnection process.
*/
public IRC_OnDisconnect(botid, ip[], port, reason[])
{
printf("*** IRC_OnDisconnect: Bot ID %d disconnected from %s:%d (%s)", botid, ip, port, reason);
// Remove the bot from the group
IRC_RemoveFromGroup(groupID, botid);
return 1;
}
/*
This callback is executed whenever a connection attempt begins. IRC_Quit may
be called at any time to stop the reconnection process.
*/
public IRC_OnConnectAttempt(botid, ip[], port)
{
printf("*** IRC_OnConnectAttempt: Bot ID %d attempting to connect to %s:%d...", botid, ip, port);
return 1;
}
/*
This callback is executed whenever a connection attempt fails. IRC_Quit may
be called at any time to stop the reconnection process.
*/
public IRC_OnConnectAttemptFail(botid, ip[], port, reason[])
{
printf("*** IRC_OnConnectAttemptFail: Bot ID %d failed to connect to %s:%d (%s)", botid, ip, port, reason);
return 1;
}
/*
This callback is executed whenever a bot joins a channel.
*/
public IRC_OnJoinChannel(botid, channel[])
{
printf("*** IRC_OnJoinChannel: Bot ID %d joined channel %s", botid, channel);
return 1;
}
/*
This callback is executed whenevever a bot leaves a channel.
*/
public IRC_OnLeaveChannel(botid, channel[], message[])
{
printf("*** IRC_OnLeaveChannel: Bot ID %d left channel %s (%s)", botid, channel, message);
return 1;
}
/*
This callback is executed whenevever a bot is invited to a channel.
*/
public IRC_OnInvitedToChannel(botid, channel[], invitinguser[], invitinghost[])
{
printf("*** IRC_OnInvitedToChannel: Bot ID %d invited to channel %s by %s (%s)", botid, channel, invitinguser, invitinghost);
IRC_JoinChannel(botid, channel);
return 1;
}
/*
This callback is executed whenevever a bot is kicked from a channel. If the
bot cannot immediately rejoin the channel (in the event, for example, that
the bot is kicked and then banned), you might want to set up a timer here
for rejoin attempts.
*/
public IRC_OnKickedFromChannel(botid, channel[], oppeduser[], oppedhost[], message[])
{
printf("*** IRC_OnKickedFromChannel: Bot ID %d kicked by %s (%s) from channel %s (%s)", botid, oppeduser, oppedhost, channel, message);
IRC_JoinChannel(botid, channel);
return 1;
}
public IRC_OnUserDisconnect(botid, user[], host[], message[])
{
printf("*** IRC_OnUserDisconnect (Bot ID %d): User %s (%s) disconnected (%s)", botid, user, host, message);
return 1;
}
public IRC_OnUserJoinChannel(botid, channel[], user[], host[])
{
printf("*** IRC_OnUserJoinChannel (Bot ID %d): User %s (%s) joined channel %s", botid, user, host, channel);
return 1;
}
public IRC_OnUserLeaveChannel(botid, channel[], user[], host[], message[])
{
printf("*** IRC_OnUserLeaveChannel (Bot ID %d): User %s (%s) left channel %s (%s)", botid, user, host, channel, message);
return 1;
}
public IRC_OnUserKickedFromChannel(botid, channel[], kickeduser[], oppeduser[], oppedhost[], message[])
{
printf("*** IRC_OnUserKickedFromChannel (Bot ID %d): User %s kicked by %s (%s) from channel %s (%s)", botid, kickeduser, oppeduser, oppedhost, channel, message);
}
public IRC_OnUserNickChange(botid, oldnick[], newnick[], host[])
{
printf("*** IRC_OnUserNickChange (Bot ID %d): User %s (%s) changed his/her nick to %s", botid, oldnick, host, newnick);
return 1;
}
public IRC_OnUserSetChannelMode(botid, channel[], user[], host[], mode[])
{
printf("*** IRC_OnUserSetChannelMode (Bot ID %d): User %s (%s) on %s set mode: %s", botid, user, host, channel, mode);
return 1;
}
public IRC_OnUserSetChannelTopic(botid, channel[], user[], host[], topic[])
{
printf("*** IRC_OnUserSetChannelTopic (Bot ID %d): User %s (%s) on %s set topic: %s", botid, user, host, channel, topic);
return 1;
}
public IRC_OnUserSay(botid, recipient[], user[], host[], message[])
{
printf("*** IRC_OnUserSay (Bot ID %d): User %s (%s) sent message to %s: %s", botid, user, host, recipient, message);
// Someone sent the first bot a private message
if (!strcmp(recipient, BOT_1_NICKNAME))
{
IRC_Say(botid, user, "You sent me a PM!");
}
return 1;
}
public IRC_OnUserNotice(botid, recipient[], user[], host[], message[])
{
printf("*** IRC_OnUserNotice (Bot ID %d): User %s (%s) sent notice to %s: %s", botid, user, host, recipient, message);
// Someone sent the second bot a notice (probably a network service)
if (!strcmp(recipient, BOT_2_NICKNAME))
{
IRC_Notice(botid, user, "You sent me a notice!");
}
return 1;
}
public IRC_OnUserRequestCTCP(botid, user[], host[], message[])
{
printf("*** IRC_OnUserRequestCTCP (Bot ID %d): User %s (%s) sent CTCP request: %s", botid, user, host, message);
// Someone sent a CTCP VERSION request
if (!strcmp(message, "VERSION"))
{
IRC_ReplyCTCP(botid, user, "VERSION SA-MP IRC Plugin v" #PLUGIN_VERSION "");
}
return 1;
}
public IRC_OnUserReplyCTCP(botid, user[], host[], message[])
{
printf("*** IRC_OnUserReplyCTCP (Bot ID %d): User %s (%s) sent CTCP reply: %s", botid, user, host, message);
return 1;
}
/*
This callback is useful for logging, debugging, or catching error messages
sent by the IRC server.
*/
public IRC_OnReceiveRaw(botid, message[])
{
new File:file;
if (!fexist("irc_log.txt"))
{
file = fopen("irc_log.txt", io_write);
}
else
{
file = fopen("irc_log.txt", io_append);
}
if (file)
{
fwrite(file, message);
fwrite(file, "\r\n");
fclose(file);
}
return 1;
}