shape1
shape2
shape3
shape4
shape7
shape8

Помогите с ошибкой


Статус
Закрыто для дальнейших ответов.

AlexandrX

Новичок
Пользователь
03.11.2014
58
10
0
Здравствуйте, при 2ом или 3ем компилировании мода возникла такая ошибка:

.pwn(10492) : warning 209: function "Streamer_OnPlayerDisconnect" should return a value

При первых компилированиях, ошибка не появлялась, а сейчас не могу придумать как завершить функцию "отсоединения"

Вот строки где выявлена ошибка:

public OnPlayerDisconnect(playerid, reason)
{
Delete3DTextLabel(AdminText3D[playerid]);
dostup[playerid] = 0;
oplayers--;
TextDrawHideForPlayer(playerid, HelpDraw);
TextDrawDestroy(lvlexp[playerid]);
TextDrawDestroy(BankMoneyDraw[playerid]);
TextDrawDestroy(TextDrawTime[playerid]);
new
iName [ MAX_PLAYER_NAME ] ,
szString [ 128 ] ,
szReason [ 16 ]
;
new message[127];
GetPlayerName ( playerid , iName , sizeof ( iName ) ) ;
format(message,sizeof(message), "%s [%d]", message, playerid);
switch ( reason ) {
case 0: strmid ( szReason , "Îøèáêà" , 0 , strlen ( "Îøèáêà" ) );
case 1: strmid ( szReason , "Âûøåë" , 0 , strlen ( "Âûøåë" ) ) ;
case 2: strmid ( szReason , "Êèê/Áàí" , 0 , strlen ( "Êèê/Áàí") ) ;
default: strmid ( szReason , "Íåèçâåñòíà" , 0 , strlen ( "Íåèçâåñòíà") ) ;
}

for ( new x ; x <= GetMaxPlayers ( ) ; x++ ) {
if ( PlayerInfo [ x ] [ pAdmin ] > 0 && IsPlayerConnected ( x ) && playerid != x ) {
format ( szString , sizeof ( szString ) , "%s (ID: %d) Ïîêèíóë Ñåðâåð ( Ïðè÷èíà: %s) !" , iName , playerid , szReason ) ;
SendClientMessage ( x , -1 , szString ) ;
}
}
//==============================================================================
gActivePlayers[playerid]--;
numplayers--;
PlayerInfo[playerid][pAdjustable] = 1;
OnPlayerUpdate(playerid);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(TaxiAccepted < 999)
{
if(TaxiAccepted == playerid)
{
TaxiAccepted = 999;
GameTextForPlayer(i, "~w~™OC’ OKC…~n~~r~ŒOK…ìY‡ CEPBEP", 5000, 1);//ÒÌÊ Âîÿæ
TaxiCallTime = 0;
DisablePlayerCheckpoint(i);
}
}
else if(BusAccepted < 999)
{
if(BusAccepted == playerid)
{
BusAccepted = 999;
GameTextForPlayer(i, "~w~Bus Caller~n~~r~Left the game", 5000, 1);
BusCallTime = 0;
DisablePlayerCheckpoint(i);
}
}
}
}
if(GettingCK[playerid] < 999)
{
if(IsPlayerConnected(GettingCK[playerid]))
{
SendClientMessage(GettingCK[playerid], COLOR_YELLOW, "Âàøà æåðòâà ïîêèíóëà ñåðâåð, ïîïûòàéòåñü ïîçæå.");
OnCK[GettingCK[playerid]] = 999;
}
}
if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999)
{
if(IsPlayerConnected(TransportDriver[playerid]))
{
new string[64];
TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
TransportTime[TransportDriver[playerid]] = 0;
TransportCost[TransportDriver[playerid]] = 0;
format(string, sizeof(string), "~w~Passenger left~n~~g~Earned $%d",TransportCost[playerid]);
GameTextForPlayer(TransportDriver[playerid], string, 5000, 1);
}
}
if(PlayerInfo[playerid][pLeader]==22&&onbusreis[playerid]==1)
{
totalbus-=1;
BusUpdate();
}
if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999)
{
if(IsPlayerConnected(TransportDriver[playerid]))
{
TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
TransportTime[TransportDriver[playerid]] = 0;
TransportCost[TransportDriver[playerid]] = 0;
new str7[256];
format(str7, sizeof(str7), "Âû çàðàáîòàëè %dp",TransportCost[playerid]);
SendClientMessage(TransportDriver[playerid], COLOR_LIGHTBLUE, str7);
//GameTextForPlayer(TransportDriver[playerid], string, 5000, 1);
}
}
if(GotHit[playerid] > 0)
{
if(GetChased[playerid] < 999)
{
if(IsPlayerConnected(GetChased[playerid]))
{
SendClientMessage(GetChased[playerid], COLOR_YELLOW, "Your Hit has left the server.");
GoChase[GetChased[playerid]] = 999;
}
}
}
if(PlayerPaintballing[playerid] != 0)
{
PaintballPlayers --;
}
if(PlayerKarting[playerid] > 0 && PlayerInKart[playerid] > 0)
{
KartingPlayers --;
}
if(PlayersChannel[playerid] < 999)
{
IRCInfo[PlayersChannel[playerid]][iPlayers] -= 1;
}
if(HireCar[playerid] != 299)
{
gLastDriver[HireCar[playerid]] = 300;
gCarLock[HireCar[playerid]] = 0;
UnLockCar(HireCar[playerid]);
}
if (gLastCar[playerid] > 0)
{
gLastDriver[gLastCar[playerid]] = 300;
if(PlayerInfo[playerid][pPhousekey] != gLastCar[playerid]-1)
{
gCarLock[gLastCar[playerid]] = 0;
UnLockCar(gLastCar[playerid]);
}
}
if(PlayerBoxing[playerid] > 0)
{
if(Boxer1 == playerid)
{
if(IsPlayerConnected(Boxer2))
{
PlayerBoxing[boxer2] = 0;
SetPlayerPos(Boxer2, 765.8433,3.2924,1000.7186);
SetPlayerInterior(Boxer2, 5);
GameTextForPlayer(Boxer2, "~r~Match interupted", 5000, 1);
}
}
else if(Boxer2 == playerid)
{
if(IsPlayerConnected(Boxer1))
{
PlayerBoxing[boxer1] = 0;
SetPlayerPos(Boxer1, 765.8433,3.2924,1000.7186);
SetPlayerInterior(Boxer1, 5);
GameTextForPlayer(Boxer1, "~r~Match interupted", 5000, 1);
}
}
InRing = 0;
RoundStarted = 0;
Boxer1 = 255;
Boxer2 = 255;
TBoxer = 255;
}
if(TransportDuty[playerid] == 1)
{
TaxiDrivers -= 1;
}
else if(TransportDuty[playerid] == 2)
{
BusDrivers -= 1;
}
if(PlayerInfo[playerid][pJob] == 11)
{
if(JobDuty[playerid] == 1) { Medics -= 1; }
}
else if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1)
{
if(JobDuty[playerid] == 1) { DTPS -= 1; }
}
else if(PlayerInfo[playerid][pJob] == 7)
{
if(JobDuty[playerid] == 1) { Mechanics -= 1; }
}
if (PlayerInfo[playerid][pRadar] != 0)
{
RemoveRadar(playerid);
}
}

 
 

Unknown

Освоившийся
Пользователь
08.10.2014
150
26
0
26
Это не ошибка! это warning Не обращайте внимания!

 
C

compan

Гость
Гость
Это не ошибка! это warning Не обращайте внимания!
Как это не обращай внимания? Мало того сами ни чего не понимаете в скриптинге ещё и других с толку сбиваете. Нужно обязательно исправлять все варнинги.

 
Статус
Закрыто для дальнейших ответов.