Help with my script
#1

Hi guys i have this error

C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(2606) : error 017: undefined symbol "sscanf"
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(2606) : warning 215: expression has no effect
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(2606) : warning 215: expression has no effect
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(2606) : warning 215: expression has no effect
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(2606) : warning 215: expression has no effect
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(2606) : warning 215: expression has no effect
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(2606) : warning 215: expression has no effect
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(2606) : error 001: expected token: ";", but found ")"
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(2606) : error 029: invalid expression, assumed zero
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(2606) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
__
and this is the script :
///----------------------IRC________________
#define MAX_WARNINGS 3
// Name that everyone will see
#define BOT_1_MAIN_NICKNAME "GirlBOT"
// Name that everyone will see (alternate)
#define BOT_1_ALTERNATE_NICKNAME "EasyBOT1"
// Name that will only be visible in a whois
#define BOT_1_REALNAME "NZTDMBOT"
// Name that will be in front of the hostname (username@hostname)
#define BOT_1_USERNAME "NZTDM"

#define BOT_2_MAIN_NICKNAME "NITRO2"
#define BOT_2_ALTERNATE_NICKNAME "NitroBOT"
#define BOT_2_REALNAME "BOT"
#define BOT_2_USERNAME "BOT2"

#define IRC_SERVER "maple.nl.eu.gtanet.com" // server address
#define IRC_PORT (6667) // joining port ( same as your port i mean 6667 )
#define IRC_CHANNEL "#nztirc[3e]" // your normal channel name
#define IRC_ADMINCHANNEL "#nztirc[3e].oper" // your o

#define MAX_BOTS (2)
native sscanf(const data[], const format[], {Float,_}:...);
native unformat(const data[], const format[], {Float,_}:...) = sscanf;
// Maximum number of bots in the filterscript

forward Inter_SendClientMessageToAll(color,msg[]);
#define PLUGIN_VERSION "1.4.3"
forward MessageToAdmins(color,const string[]);
enum ServerData
{
AntiSwear,
AntiSpam,
MaxAdminLevel,
MaxPing,
ReadPMs,
Locked,
Password[128],
ReadCmds,
NoCaps,
AntiBot,
AdminOnlySkins,
AdminSkin,
AdminSkin2,
NameKick,
PartNameKick,
ConnectMessages,
DisableChat,
AdminCmdMsg,
GiveMoney,
GiveWeap,
AutoLogin,
MustLogin,
MustRegister,
ForbiddenWeaps,
MaxMuteWarnings,
AntiAds,
Announce,
};

enum PlayerData
{
Level,
MaxAdminLevel,
Warnings,
Jailed,
Frozen,
LoggedIn,
pPing,
Muted,
MuteWarnings,
};



new ServerInfo[ServerData];
new AccInfo[MAX_PLAYERS][PlayerData];
new botIDs[MAX_BOTS], groupID;
new gBotID[MAX_BOTS], gGroupID;
new botIDs2[MAX_BOTS], groupID2;
forward Inter_SendClientMessageToAll(color,msg[]);
forward Inter_SendClientMessage(playerid,color,msg[]);
forward Inter_SendClientMessageToAll(color,msg[]);
public Inter_SendClientMessageToAll(color,msg[])
{
SendClientMessageToAll(color,msg);
return 1;
}
//---------------------------

new iSpawnSet[MAX_PLAYERS];

enum Info
{
ad,
s,
pns,
pVip,
pCash,
pScore,
pKills,
pDeaths,
};
new pInfo[MAX_PLAYERS][Info];
///_________________

#define PATH "/Users/%s.ini"

new gPlayerLogged[MAX_PLAYERS];


//__________________

main()
{
print("\n----------------------------------");
print(" Running Test \n");
print(" test");
print(" trutitantest");
print("----------------------------------\n");
}


public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
botIDs[0] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_1_MAIN_NICKNAME, BOT_1_REALNAME, BOT_1_USERNAME);
IRC_SetIntData(botIDs[0], E_IRC_CONNECT_DELAY, 5);
botIDs[1] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_2_MAIN_NICKNAME, BOT_2_REALNAME, BOT_2_USERNAME);
IRC_SetIntData(botIDs[1], E_IRC_CONNECT_DELAY, 6);
groupID = IRC_CreateGroup();
return 1;
}

public OnGameModeExit()
{
IRC_Quit(botIDs[0], "GameMode exiting");
// Disconnect the second bot
IRC_Quit(botIDs[1], "GameMode exiting");
// Destroy the group
IRC_DestroyGroup(groupID);
return 1;
}


public OnPlayerConnect(playerid)
{
new joinMsg[128], sname[MAX_PLAYER_NAME];
GetPlayerName(playerid, sname, sizeof(sname));
format(joinMsg, sizeof(joinMsg),"12 %s [%d] has joined the server. [Country: Private | IP Address: %s]",sname,playerid,pIP(playerid));
IRC_GroupSay(groupID, IRC_CHANNEL, joinMsg);
return 1;
}

public OnPlayerSpawn(playerid)
{

//GivePlayerMoney(playerid, PocketMoney);
SetPlayerInterior(playerid,0);
//SetPlayerRandomSpawn(playerid);
TogglePlayerClock(playerid,1);
new spawn[210];
new ps[MAX_PLAYER_NAME];
GetPlayerName(playerid, ps, sizeof(ps));
format(spawn, sizeof(spawn),"7[SPAWN] %s (%d) Has Spawned",ps,playerid);
IRC_GroupSay(groupID, IRC_CHANNEL, spawn);
return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}

public OnVehicleSpawn(vehicleid)
{
return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}

public OnPlayerText(playerid, text[])
{
new string[120];
format(string, sizeof(string),"[%d]:%s",playerid,text);
SendPlayerMessageToAll(playerid,string);

new name[MAX_PLAYER_NAME], ircMsg[256];
GetPlayerName(playerid, name, sizeof(name));
format(ircMsg, sizeof(ircMsg), "02[%d] 07%s: %s", playerid, name, text);
IRC_GroupSay(groupID, IRC_CHANNEL, ircMsg);
return 0;
}
//////////_-----------------------------------------------



public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}

pIP(playerid){
new ip[26];
GetPlayerIp(playerid, ip, sizeof(ip));
return ip;
}
forward IRC_ConnectDelay(tempircid);
public IRC_ConnectDelay(tempircid)
{
switch (tempircid)
{
case 1:
{
botIDs2[0] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_1_MAIN_NICKNAME, BOT_1_REALNAME, BOT_1_USERNAME);
}
case 2:
{
botIDs[1] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_2_MAIN_NICKNAME, BOT_2_REALNAME, BOT_2_USERNAME);
}
}
return 1;
}
/*
The IRC callbacks are below. Many of these are simply derived from parsed
raw messages received from the IRC server. They can be used to inform the
bot of new activity in any of the channels it has joined.
*/
public IRC_OnConnect(botid)
{
printf("*** IRC_OnConnect: Bot ID %d connected!", botid);
IRC_JoinChannel(botid, IRC_CHANNEL);
IRC_JoinChannel(botid,IRC_ADMINCHANNEL);
// Add the bot to the group
IRC_AddToGroup(groupID, botid);
return 1;
}

/*
Note that this callback is executed whenever a current connection is closed
OR whenever a connection attempt fails. Reconnecting too fast can flood the
IRC server and possibly result in a ban. It is recommended to set up
connection reattempts on a timer, as demonstrated here.
*/
public IRC_OnDisconnect(botid)
{
printf("*** IRC_OnDisconnect: Bot ID %d disconnected!", botid);
if (botid == botIDs[0])
{
// Wait 20 seconds for the first bot
SetTimerEx("IRC_ConnectDelay", 20000, 0, "d", 1);
}
else if (botid == botIDs[1])
{
// Wait 25 seconds for the second bot
SetTimerEx("IRC_ConnectDelay", 25000, 0, "d", 2);
}
printf("*** IRC_OnDisconnect: Bot ID %d attempting to reconnect...", botid);
// Remove the bot from the group
if(botid==1) IRC_RemoveFromGroup(groupID, botid);
if(botid==2) IRC_RemoveFromGroup(groupID, botid);
return 1;
}

public IRC_OnJoinChannel(botid, channel[])
{
printf("*** IRC_OnJoinChannel: Bot ID %d joined channel %s!", botid, channel);
return 1;
}

/*
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 as well for rejoin attempts.
*/

public IRC_OnLeaveChannel(botid, channel[], message[])
{
printf("*** IRC_OnLeaveChannel: Bot ID %d left channel %s (%s)!", botid, 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_OnUserNickChange(botid, oldnick[], newnick[], host[])
{
printf("*** IRC_OnUserNickChange (Bot ID %d): User %s (%s) changed his 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_MAIN_NICKNAME) || !strcmp(recipient, BOT_2_MAIN_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_1_MAIN_NICKNAME) || !strcmp(recipient, BOT_2_MAIN_NICKNAME))
{
IRC_Notice(botid, user, "You sent me a notice!");
}
return 1;
}

/*
Do not print these messages in the console output, as they will probably
crash the SA-MP server if they are too long. This callback is better suited
for logging, debugging, or catching error messages sent by the IRC server.
*/
public IRC_OnReceiveRaw(botid, message[])
{
new File:file, output[1536];
strmid(output, message, 0, sizeof(output), sizeof(output));
if (!fexist("irc_log.txt"))
{
file = fopen("irc_log.txt", io_write);
fwrite(file, output);
fclose(file);
}
else
{
file = fopen("irc_log.txt", io_append);
fwrite(file, output);
fclose(file);
}
return 1;
}

/*
Some examples of channel commands are here. You can add more very easily;
their implementation is identical to that of ZeeX's zcmd.
*/

IRCCMD:cmds(botid, channel[], user[], host[], params[])
{
if (IRC_IsVoice(botid, channel, user)) // Check if the user has at least voice in the channel
{
new msg[128];
// Echo the formatted message
format(msg, sizeof(msg), "03Normal Commands:2 !msg <Text> and !cmds only.");
IRC_GroupSay(groupID, channel, msg);
}
if (IRC_IsHalfop(botid, channel, user)) // Check if the user has at least half op in the channel
{
new msg[128];
// Echo the formatted message
IRC_GroupSay(groupID, channel, msg);
format(msg, sizeof(msg), "04HalfOP Commands:2 !ann <Text>, !say <Text>, !listids, !getinfo, !mute <Player ID> <Reason>, !unmute <Player ID>, !muted");
IRC_GroupSay(groupID, channel, msg);
}
if (IRC_IsOp(botid, channel, user)) // Check if the user has at least op in the channel
{
new msg[128];
// Echo the formatted message
IRC_GroupSay(groupID, channel, msg);
format(msg, sizeof(msg), "04OP Commands:2 !ban <Player ID> <Reason>, !kick <Player ID> <Reason> !asay <Message>");
IRC_GroupSay(groupID, channel, msg);
}
if (IRC_IsOwner(botid, channel, user)) // Check if the user has an op in the channel
{
new msg[128];
// Echo the formatted message
IRC_GroupSay(groupID, channel, msg);
format(msg, sizeof(msg), "07Owner Commands:2 !restart.");
IRC_GroupSay(groupID, channel, msg);
}
return 1;
}

IRCCMD:ann(botid, channel[], user[], host[], params[])
{
if (IRC_IsHalfop(botid, channel, user)) // Check if the user has at least half op in the channel
{
// Check if the user entered any text
if (!isnull(params))
{
new msg[128];
// Echo the formatted message
format(msg, sizeof(msg), "02Admin %s have sent announcement:13 %s", user, params);
IRC_GroupSay(groupID, channel, msg);
format(msg, sizeof(msg), "Admin %s have sent announcement: %s", user, params);
GameTextForAll(params,4000,3);
}
}
return 1;
}

IRCCMD:msg(botid, channel[], user[], host[], params[])
{
if (IRC_IsVoice(botid, channel, user)) // Check if the user has at least voice in the channel
{
// Check if the user entered any text
if (!isnull(params))
{
new msg[128];
// Echo the formatted message
format(msg, sizeof(msg), "02*** %s on IRC: %s", user, params);
IRC_GroupSay(groupID, channel, msg);
format(msg, sizeof(msg), "*** %s on IRC: %s", user, params);
Inter_SendClientMessageToAll(white, msg);
}
}
return 1;
}

IRCCMDay(botid, channel[], user[], host[], params[])
{
if (IRC_IsHalfop(botid, channel, user)) // Check if the user has at least half op in the channel
{
// Check if the user entered any text
if (!isnull(params))
{
new msg[128];
// Echo the formatted message
format(msg, sizeof(msg), "02Admin %s on IRC: %s", user, params);
IRC_GroupSay(groupID, channel, msg);
IRC_GroupSay(groupID2, channel, msg);
format(msg, sizeof(msg), "Admin %s on IRC: %s", user, params);
Inter_SendClientMessageToAll(yellow, msg);
}
}
return 1;
}

IRCCMD:asay(botid, channel[], user[], host[], params[])
{
if (IRC_IsOp(botid, channel, user)) // Check if the user has at least op in the channel
{
// Check if the user entered any text
if (!isnull(params))
{
new string[128];
format(string,sizeof(string),"Admin Chat(IRC): %s: %s",user,params);
MessageToAdmins(green,string);
format(string,sizeof(string),"9Admin Chat(IRC): %s: %s",user,params);
IRC_GroupSay(groupID2, IRC_ADMINCHANNEL, string);
}
}
return 1;
}

IRCCMD:kick(botid, channel[], user[], host[], params[])
{
// Check if the user is at least a halfop in the channel
if (IRC_IsOp(botid, channel, user))
{
new playerid, reason[64];
// If the user did enter a player ID, then the command will not be processed
if (sscanf(params, "dz", playerid, reason))
{
return 1;
}
// If the player is not connected, then nothing will be done
if (IsPlayerConnected(playerid))
{
new msg[128], playname[MAX_PLAYER_NAME];
// If no reason is given, then "No reason" will be stated
if (isnull(reason))
{
format(reason, sizeof(reason), "No reason");
}
// Echo the formatted message and kick the user
GetPlayerName(playerid, playname, sizeof(playname));
format(msg, sizeof(msg), "04*** %s has been kicked by %s on IRC. (%s)", playname, user, reason);
IRC_GroupSay(groupID, channel, msg);
format(msg, sizeof(msg), "*** %s has been kicked by %s on IRC. (%s)", playname, user, reason);
Inter_SendClientMessageToAll(red, msg);
Kick(playerid);
}
}
return 1;
}

IRCCMD:warn(botid, channel[], user[], host[], params[]) {
// Check if the user is at least a halfop in the channel
if (IRC_IsHalfop(botid, channel, user))
{
new playerid, reason[64];
// If the user did enter a player ID, then the command will not be processed
if (sscanf(params, "dz", playerid, reason))
{
return 1;
}
// If the player is not connected, then nothing will be done
if (IsPlayerConnected(playerid) && playerid != INVALID_PLAYER_ID)
{
new str[128], playname[MAX_PLAYER_NAME];
// If no reason is given, then "No reason" will be stated
if (isnull(reason))
{
format(reason, sizeof(reason), "No reason");
}
GetPlayerName(playerid, playname, sizeof(playname));
if(AccInfo[playerid][Level] == ServerInfo[MaxAdminLevel]) return IRC_GroupSay(groupID, channel, "ERROR: You cannot use this command on this admin");
MessageToAdmins(playerid,"WARN");
AccInfo[playerid][Warnings]++;
if( AccInfo[playerid][Warnings] == MAX_WARNINGS) {
format(str, sizeof (str), "8***IRC Administrator \"%s\" has kicked \"%s\". (Reason: %s) (Warning: %d/%d)***", user, playname, reason, AccInfo[playerid][Warnings], MAX_WARNINGS);
IRC_GroupSay(gGroupID, channel, str);
format(str, sizeof (str), "***IRC Administrator \"%s\" has kicked \"%s\". (Reason: %s) (Warning: %d/%d)***", user, playname, reason, AccInfo[playerid][Warnings], MAX_WARNINGS);
Inter_SendClientMessageToAll(grey, str);
return AccInfo[playerid][Warnings] = 0;
} else {
format(str, sizeof (str), "8***IRC Administrator \"%s\" has given \"%s\" a warning. (Reason: %s) (Warning: %d/%d)***", user, playname, reason, AccInfo[playerid][Warnings], MAX_WARNINGS);
IRC_GroupSay(gGroupID, channel, str);
format(str, sizeof (str), "***IRC Administrator \"%s\" has given \"%s\" a warning. (Reason: %s) (Warning: %d/%d)***", user, playname, reason, AccInfo[playerid][Warnings], MAX_WARNINGS);
return Inter_SendClientMessageToAll(yellow, str);
}
}
}
return 1;
}

IRCCMD:listids(botid, channel[], user[], host[], params[]) {
if (IRC_IsHalfop(botid, channel, user))
{
for(new i=0;i<GetMaxPlayers();i++) {
if(IsPlayerConnected(i)){
new playername[MAX_PLAYER_NAME], str[128], tmp3[50];
GetPlayerIp(i,tmp3,50);
GetPlayerName(i, playername, sizeof(playername));
format(str,sizeof(str),"12(%d)%s [%s(%s)]", i, playername, tmp3, GetPlayerCountryName(i));
IRC_GroupSay(gGroupID, channel, str);
}
}
} else return IRC_GroupSay(gGroupID, channel, "4ERROR: You are must be HalfOp to use this command");
return 1;
}




IRCCMD:mute(botid, channel[], user[], host[], params[]) {
// Check if the user is at least a halfop in the channel
if (IRC_IsHalfop(botid, channel, user))
{
new playerid, reason[64];
// If the user did enter a player ID, then the command will not be processed
if (sscanf(params, "dz", playerid, reason))
{
return 1;
}
// If the player is not connected, then nothing will be done
if (IsPlayerConnected(playerid) && playerid != INVALID_PLAYER_ID)
{
new string[128], playername[MAX_PLAYER_NAME];
// If no reason is given, then "No reason" will be stated
if (isnull(reason))
{
format(reason, sizeof(reason), "No reason");
}
if((AccInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) ) {
if(AccInfo[playerid][Muted] == 0) {
GetPlayerName(playerid, playername, sizeof(playername));
PlayerPlaySound(playerid,1057,0.0,0.0,0.0); AccInfo[playerid][Muted] = 1; AccInfo[playerid][MuteWarnings] = 0;
format(string,sizeof(string),"You have been muted by IRC Administrator %s [reason: %s]",user,reason); SendClientMessage(playerid,blue,string);
format(string,sizeof(string),"2You have muted %s [reason: %s]", playername,reason); return IRC_GroupSay(gGroupID, channel, string);
} else return IRC_GroupSay(gGroupID, channel, "4Player is already muted");
} else return IRC_GroupSay(gGroupID, channel, "4ERROR: Player is the highest level admin");
} else return IRC_GroupSay(gGroupID, channel, "4ERROR: Player is not connected");
} else return IRC_GroupSay(gGroupID, channel, "4ERROR: You must be channel half operator to use this commands");
}

IRCCMD:unmute(botid, channel[], user[], host[], params[]) {
// Check if the user is at least a halfop in the channel
if (IRC_IsHalfop(botid, channel, user))
{
new playerid, playername[MAX_PLAYER_NAME],string[128];
// If the user did enter a player ID, then the command will not be processed
if (sscanf(params, "d", playerid))
{
return 1;
}
// If the player is not connected, then nothing will be done
if (IsPlayerConnected(playerid) && playerid != INVALID_PLAYER_ID)
{
if(AccInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) {
if(AccInfo[playerid][Muted] == 1) {
GetPlayerName(playerid, playername, sizeof(playername));
PlayerPlaySound(playerid,1057,0.0,0.0,0.0); AccInfo[playerid][Muted] = 0; AccInfo[playerid][MuteWarnings] = 0;
format(string,sizeof(string),"You have been unmuted by IRC Administrator %s",user); SendClientMessage(playerid,blue,string);
format(string,sizeof(string),"2You have unmuted %s", playername); return IRC_GroupSay(gGroupID, channel, string);
} else return IRC_GroupSay(gGroupID, channel, "2Player is not muted");
} else return IRC_GroupSay(gGroupID, channel, "4ERROR: Player is the highest level admin");
} else return IRC_GroupSay(gGroupID, channel, "4ERROR: Player is not connected");
} else return IRC_GroupSay(gGroupID, channel, "4ERROR: You must be channel half operator to use this command");
}

IRCCMDlayers( botid, channel[], user[], host[], params[] )
{
new tempstr[128], string[200], count, name[24];
for( new i ,slots = GetMaxPlayers(); i < slots; i++ )
{
if(IsPlayerConnected(i))
{
count++;
GetPlayerName(i, name, sizeof(name));
format(tempstr, sizeof(tempstr), "%s %s", tempstr, name);
}
}
if(count)
{
format(string, sizeof(string), "10>> Players Online[%d/%d]: %s", count, GetMaxPlayers(), tempstr);
IRC_Say(botid, channel, string);
} else IRC_Say(botid, channel, "No players are online .");
return 1;
}

IRCCMD:muted(botid, channel[], user[], host[], params[]) {
// Check if the user is at least a halfop in the channel
if (IRC_IsHalfop(botid, channel, user))
{
new bool:First2 = false, Count, adminname[MAX_PLAYER_NAME], string[128], i;
for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && AccInfo[i][Muted]) Count++;
if(Count == 0) return IRC_GroupSay(gGroupID, channel, "4No players are muted");

for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && AccInfo[i][Muted]) {
GetPlayerName(i, adminname, sizeof(adminname));
if(!First2) { format(string, sizeof(string), "Muted Players: (%d)%s", i,adminname); First2 = true; }
else format(string,sizeof(string),"%s, (%d)%s ",string,i,adminname);
}
return IRC_GroupSay(gGroupID, channel, string);
} else return IRC_GroupSay(gGroupID, channel, "4ERROR: You are must be channel half operator to use this command");
}

IRCCMD:ban(botid, channel[], user[], host[], params[])
{
// Check if the user is at least an op in the channel
if (IRC_IsOp(botid, channel, user))
{
new playerid, reason[64];
// If the user did enter a player ID, then the command will not be processed
if (sscanf(params, "dz", playerid, reason))
{
return 1;
}
// If the player is not connected, then nothing will be done
if (IsPlayerConnected(playerid))
{
new msg[128], playname[MAX_PLAYER_NAME];
// If no reason is given, then "No reason" will be stated
if (isnull(reason))
{
format(reason, sizeof(reason), "No reason");
}
// Echo the formatted message and ban the user
GetPlayerName(playerid, playname, sizeof(playname));
format(msg, sizeof(msg), "04*** %s has been banned by %s on IRC. (%s)", playname, user, reason);
IRC_GroupSay(gGroupID, channel, msg);
format(msg, sizeof(msg), "*** %s has been banned by %s on IRC. (%s)", playname, user, reason);
Inter_SendClientMessageToAll(red, msg);
BanEx(playerid, reason);
}
}
return 1;
}




IRCCMD:restart(botid, channel[], user[], host[], params[])
{
if(IRC_IsOwner(botid,channel,user))
{
if (IRC_IsVoice(botid, channel, user))
{
SendRconCommand("gmx");
}
} else IRC_Say(gBotID[0],channel,"4Error: You must be operator to use this command.");
return 1;
}


public MessageToAdmins(color,const string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) == 1)
if(AccInfo[i][Level] >= 1){
SendClientMessage(i, color, string); }
}
return 1;
}
const MAX_COUNTRY_NAME = 45;
//const MAX_CITY_NAME = 0;

native GetCountryCode(const ipaddress[], country[], size = sizeof country);
native GetCountryCode3(const ipaddress[], country[], size = sizeof country);
native GetCountryName(const ipaddress[], country[], size = sizeof country);
native GetCityLatitude(const ipaddress[], &Float:lat);
native GetCityLongitude(const ipaddress[], &Float:lon);

native GetCountryCodeByName(const name[], country[], size = sizeof country);
native GetCountryCode3ByName(const name[], country[], size = sizeof country);
native GetCountryNameByName(const name[], country[], size = sizeof country);
native GetCityLatitudeByName(const name[], &Float:lat);
native GetCityLongitudeByName(const name[], &Float:lon);


stock GetPlayerCountryName(playerid)
{
new ip[16], country[MAX_COUNTRY_NAME];
GetPlayerIp(playerid, ip, sizeof(ip));
new ret = GetCountryName(ip, country, sizeof(country));
if(!ret)
format(country, sizeof(country), "Private IP");
return country;
}

forward GlobalAnnouncement(Msg);
public GlobalAnnouncement(Msg)
{
switch (Msg)
{
case 0:
{SendClientMessageToAll(blue, "'"); Msg++;}

case 1:
{SendClientMessageToAll(blue, "' "); Msg++;}

case 2:
{SendClientMessageToAll(blue, "' "); Msg++;}

case 3:
{SendClientMessageToAll(blue, "' ");Msg++;}

case 4:
{SendClientMessageToAll(blue, "' ");Msg = 0;}
}
return 1;
}


PlayerName2(playerid) {
new plname[MAX_PLAYER_NAME];
GetPlayerName(playerid, plname, sizeof(plname));
return plname;
}

public Inter_SendClientMessage(playerid,color,msg[])
{
SendClientMessage(playerid,color,msg);
return 1;
}
what is the wrong?
Reply
#2

1.

PHP код:
#include <sscanf> //or sscanf2 depends wich you got 
if you still get undefined symbol "sscanf" download sscanf plugin add in server.cfg new line "plugins sscanf" or "plugins.so" if you'r using linux

show the error lines! not the whole code
Reply
#3

Download this plugin and compile again.
https://sampforum.blast.hk/showthread.php?tid=570927
Reply
#4

now it give this errors
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(23307) : warning 217: loose indentation
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(23449) : warning 217: loose indentation
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(2718 : warning 217: loose indentation
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(57779) : warning 215: expression has no effect
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(57807) : error 025: function heading differs from prototype
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(57807) : error 025: function heading differs from prototype
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(5780 : error 021: symbol already defined: "unformat"
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(57815) : warning 201: redefinition of constant/macro (symbol "ServerData")
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(57816) : error 021: symbol already defined: "AntiSwear"
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(57860) : error 021: symbol already defined: "ServerInfo"
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(57876) : error 021: symbol already defined: "iSpawnSet"
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(57889) : error 021: symbol already defined: "pInfo"
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(57900) : error 021: symbol already defined: "main"
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(57910) : error 021: symbol already defined: "SSCANF_OnGameModeInit"
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(57921) : error 021: symbol already defined: "OnGameModeExit"
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(57932) : error 021: symbol already defined: "SSCANF_OnPlayerConnect"
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(57941) : error 021: symbol already defined: "OnPlayerSpawn"
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(57956) : error 021: symbol already defined: "OnPlayerDeath"
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(57961) : error 021: symbol already defined: "OnVehicleSpawn"
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(57966) : error 021: symbol already defined: "OnVehicleDeath"
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(57971) : error 021: symbol already defined: "OnPlayerText"
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(57976) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(57977) : error 035: argument type mismatch (argument 2)
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(57977) : error 035: argument type mismatch (argument 2)
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(57976) : warning 204: symbol is assigned a value that is never used: "name"
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(58416) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(58422) : error 035: argument type mismatch (argument 2)
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(58422) : error 035: argument type mismatch (argument 2)
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(58416) : warning 204: symbol is assigned a value that is never used: "name"
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(58500) : error 021: symbol already defined: "MessageToAdmins"
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(58512) : error 021: symbol already defined: "GetCountryCode"
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(58513) : error 021: symbol already defined: "GetCountryCode3"
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(58514) : error 021: symbol already defined: "GetCountryName"
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(58515) : error 021: symbol already defined: "GetCityLatitude"
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(58516) : error 021: symbol already defined: "GetCityLongitude"

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Reply
#5

i fixed some
so i have 6
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(23307) : warning 217: loose indentation
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(23449) : warning 217: loose indentation
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(2718 : warning 217: loose indentation
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(57779) : warning 215: expression has no effect
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(57807) : error 025: function heading differs from prototype
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(57807) : error 025: function heading differs from prototype
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(5780 : error 021: symbol already defined: "BAD_sscanf"
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(5780 : error 025: function heading differs from prototype
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(5780 : error 025: function heading differs from prototype
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(5780 : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Reply
#6

Quote:
Originally Posted by NitroZeth
Посмотреть сообщение
i fixed some
so i have 6
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(23307) : warning 217: loose indentation
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(23449) : warning 217: loose indentation
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(2718 : warning 217: loose indentation
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(57779) : warning 215: expression has no effect
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(57807) : error 025: function heading differs from prototype
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(57807) : error 025: function heading differs from prototype
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(5780 : error 021: symbol already defined: "BAD_sscanf"
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(5780 : error 025: function heading differs from prototype
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(5780 : error 025: function heading differs from prototype
C:\Users\donat\Desktop\GTTDM~RP v9 full edited by nitrozeth1\Gamemodes\NZTDMv9.pwn(5780 : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Show us the code for each line please
Reply
#7

The next time use code ([code]
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)