08.09.2012, 17:28
Okay i got these warnings
And
pawn Код:
C:\Users\Bichan\Desktop\UKTDM\gamemodes\UKTDM.pwn(329) : warning 225: unreachable code
C:\Users\Bichan\Desktop\UKTDM\gamemodes\UKTDM.pwn(361) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Warnings.
pawn Код:
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid,-1,"Welcome to United Kingdom TDM! Dont forget to check /updates ! ");
new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "** %s has joined United Kingdom TDM", name);
SendClientMessageToAll(-1, string);
{
new file[64],PlayerName[25];//Creating a variable where we can store the file path, and the variable to store the player's name.
GetPlayerName(playerid,PlayerName,sizeof PlayerName);//Storing the players name in the PlayerName variable.
format(file,sizeof file,"Admin/%s.ini",PlayerName);//Storing the file path with the players name.
if(!fexist(file))//Checking if the file exists
{//Here goes the stuff you want to do if the user is not registered.
SendClientMessage(playerid,-4,"You are not registered! Please use /register <password>");
}
else
{//Here goes the stuff you want to do if the user is registered.
SendClientMessage(playerid,-4,"You are registered! Use /login <password>");
}
return 1;
}
Web = TextDrawCreate(495.000000, 10.000000, "uk-gaming-samp.co.uk/tdm"); // LINE 329
TextDrawBackgroundColor(Web, 255);
TextDrawFont(Web, 1);
TextDrawLetterSize(Web, 0.330000, 1.200000);
TextDrawColor(Web, 10040319);
TextDrawSetOutline(Web, 0);
TextDrawSetProportional(Web, 1);
TextDrawSetShadow(Web, 1);
UKTDM = TextDrawCreate(2.000000, 437.000000, "UK:TDM BETA V2.0 by Max");
TextDrawBackgroundColor(UKTDM, 255);
TextDrawFont(UKTDM, 2);
TextDrawLetterSize(UKTDM, 0.330000, 1.000000);
TextDrawColor(UKTDM, 10040319);
TextDrawSetOutline(UKTDM, 0);
TextDrawSetProportional(UKTDM, 1);
TextDrawSetShadow(UKTDM, 1);
TextDrawShowForPlayer(playerid, Web);
TextDrawShowForPlayer(playerid, UKTDM);
return 1;
}
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
{
PInfo[playerid][Logged] = 0;//Setting the logged in variable to 0.
return 1;
}
format(string, sizeof(string), "** %s has left United Kingdom TDM", name); //LINE 361
SendClientMessageToAll(-1, string);
return 1;
}