Započeo Ante_Street
•24. Jan. 2011.(Pomoc)Warning kod FS
770
pregleda
5
postova
Shot Caller
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
192
Postovi:
61
Teme:
Pridružio se:Apr. 2010
24. Jan. 2011.
public OnPlayerDeath(playerid, killerid, reason)
{
new name;
new string;//256
new Float:px,Float:py,Float:pz;
new killername;
GetPlayerName(playerid, name, sizeof(name));
GetPlayerPos(playerid, px, py, pz);
if(killerid != 255)
{
if(GetPlayerState(killerid) == 2)
{
GetPlayerName(killerid, killername, sizeof(killername));
format(string, sizeof(string), "Presidente %s(ID: %d) je ubio igraca %s", killername, killerid, name);
SendClientMessageToAll(COLOR_YELLOW, string);
return 1;
}
}
} // odi pise da je warning
Ovo je taj warning;
C:\Documents and Settings\JAKOV\Desktop\Moj server\Los Santos\Team\filterscripts\Team.pwn(63) : warning 209: function "OnPlayerDeath" should return a value
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Warning.
Radim jednu fs kao sto vidite...ako neko moze pomoc bio bi mu zahvalan jer se mucim gotovo 1h oko ovog warninga...
Legenda Foruma
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosAktivan Član
12 / 250 XP
Početnik(1)
888
Postovi:
66
Teme:
Pridružio se:Okt. 2009
24. Jan. 2011.
public OnPlayerDeath(playerid, killerid, reason)
{
new name;
new string;//256
new Float:px,Float:py,Float:pz;
new killername;
GetPlayerName(playerid, name, sizeof(name));
GetPlayerPos(playerid, px, py, pz);
if(killerid != 255)
{
if(GetPlayerState(killerid) == 2)
{
GetPlayerName(killerid, killername, sizeof(killername));
format(string, sizeof(string), "Presidente %s(ID: %d) je ubio igraca %s", killername, killerid, name);
SendClientMessageToAll(COLOR_YELLOW, string);
return 1;
}
}
return true;
} // odi pise da je warning
{
new name;
new string;//256
new Float:px,Float:py,Float:pz;
new killername;
GetPlayerName(playerid, name, sizeof(name));
GetPlayerPos(playerid, px, py, pz);
if(killerid != 255)
{
if(GetPlayerState(killerid) == 2)
{
GetPlayerName(killerid, killername, sizeof(killername));
format(string, sizeof(string), "Presidente %s(ID: %d) je ubio igraca %s", killername, killerid, name);
SendClientMessageToAll(COLOR_YELLOW, string);
return 1;
}
}
return true;
} // odi pise da je warning
24. Jan. 2011.
Quote from January 24, 2011, 9:44 am:
public OnPlayerDeath(playerid, killerid, reason)
{
new name;
new string;//256
new Float:px,Float:py,Float:pz;
new killername;
GetPlayerName(playerid, name, sizeof(name));
GetPlayerPos(playerid, px, py, pz);
if(killerid != 255)
{
if(GetPlayerState(killerid) == 2)
{
GetPlayerName(killerid, killername, sizeof(killername));
format(string, sizeof(string), "Presidente %s(ID: %d) je ubio igraca %s", killername, killerid, name);
SendClientMessageToAll(COLOR_YELLOW, string);
return 1;
}
}
return true;
} // odi pise da je warning
{
new name;
new string;//256
new Float:px,Float:py,Float:pz;
new killername;
GetPlayerName(playerid, name, sizeof(name));
GetPlayerPos(playerid, px, py, pz);
if(killerid != 255)
{
if(GetPlayerState(killerid) == 2)
{
GetPlayerName(killerid, killername, sizeof(killername));
format(string, sizeof(string), "Presidente %s(ID: %d) je ubio igraca %s", killername, killerid, name);
SendClientMessageToAll(COLOR_YELLOW, string);
return 1;
}
}
return true;
} // odi pise da je warning
izacice mu warning 217: loose indentitaion
samo namesti da je return true; (moze i return 1😉 da bude pocetak kod predzadnjeg } onda neces dobiti warning
Shot Caller
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
192
Postovi:
61
Teme:
Pridružio se:Apr. 2010
24. Jan. 2011.
if(GetPlayerState(killerid) == 2)
{
GetPlayerName(killerid, killername, sizeof(killername));
//SendOwnerMessage(COLOR_YELLOW, string, 1);
format(string, sizeof(string), "Terorist tim %s(ID: %d) je ubio igraca %s", killername, killerid, name);
SendClientMessageToAll(COLOR_YELLOW, string);
//SendClientMessageABroadCast
return 1;
if(GetPlayerState(killerid) == 2)
{
GetPlayerName(killerid, killername, sizeof(killername));
format(string, sizeof(string), "Presidente %s(ID: %d) je ubio igraca %s", killername, killerid, name);
SendClientMessageToAll(COLOR_YELLOW, string);
return 1;
Kako mogu uklopiti i terorista u dio coda,znaci da imam rezultat predsjednika i terrorista...
Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava