I need help [warning 225: unreachable code] - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: I need help [warning 225: unreachable code] (
/showthread.php?tid=656769)
I need help [warning 225: unreachable code] -
WilliamVN - 23.07.2018
I'm having trouble with this code, Please help me, I'm Thank
[warning 225: unreachable code]
PHP код:
if(PlayerInfo[playerid][pCash] < money) return SendClientMessageEx(playerid, -1, "Ban khong du so tien do de moi dau sung");
if(PlayerInfo[giveplayerid][pCash] < money) return SendClientMessageEx(playerid, -1, "Nguoi do khong co du so tien de dau sung");
if(strcmp(sung, "deagle", true) == 0) return weaponid = 24;
else if(strcmp(sung, "Shotgun", true) == 0) return weaponid = 25;
else return SendClientMessageEx(playerid, COLOR_GREY, "Sai ten vu khi");
duel[playerid] = giveplayerid, moneyduel[playerid] = money, weaponduel[playerid] = weaponid;
duel[giveplayerid] = playerid, moneyduel[giveplayerid] = money, weaponduel[giveplayerid] = weaponid;
new string[255];
format(string, sizeof(string), "[DAU SUNG]: Ban da moi %s tham gia dau sung voi $%d, vu khi: %s", GetPlayerNameEx(giveplayerid),money,sung);
SendClientMessageEx(playerid, -1, string);
format(string, sizeof(string), "[DAU SUNG]: %s da moi ban tham gia dau sung voi $%d, vu khi: %s", GetPlayerNameEx(playerid),money,sung);
SendClientMessageEx(giveplayerid, -1, string);
SetPVarInt(giveplayerid, "moidausung", 1);
Error it informs this paragraph
duel[playerid] = giveplayerid, moneyduel[playerid] = money, weaponduel[playerid] = weaponid;
Re: I need help [warning 225: unreachable code] -
Florin48 - 23.07.2018
PHP код:
if(strcmp(sung, "deagle", true) == 0) weaponid = 24;
else if(strcmp(sung, "Shotgun", true) == 0) weaponid = 25;
else return SendClientMessageEx(playerid, COLOR_GREY, "Sai ten vu khi");
try now
Re: I need help [warning 225: unreachable code] -
WilliamVN - 24.07.2018
Quote:
Originally Posted by Florin48
PHP код:
if(strcmp(sung, "deagle", true) == 0) weaponid = 24;
else if(strcmp(sung, "Shotgun", true) == 0) weaponid = 25;
else return SendClientMessageEx(playerid, COLOR_GREY, "Sai ten vu khi");
try now
|
It worked really thank you
Re: I need help [warning 225: unreachable code] -
coool - 24.07.2018
Quote:
Originally Posted by Florin48
PHP код:
if(strcmp(sung, "deagle", true) == 0) weaponid = 24;
else if(strcmp(sung, "Shotgun", true) == 0) weaponid = 25;
else return SendClientMessageEx(playerid, COLOR_GREY, "Sai ten vu khi");
try now
|
Just giving out the code is counter-productive. You should explain the error.