warning 225: unreachable code
#1

Code:
E:\UGUR\Oyun\SLayeR Yeni\Mod\gamemodes\slayer.pwn(5157) : warning 225: unreachable code
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
CODES

Code:
if(GetPlayerScore(playerid) < 50 || (PlayerInfo[playerid][onlinet]+(gettime()-onlines[playerid])) < 3600)return SendClientMessage(playerid,-1,"{C9404E}<!> {FFFFFF} {FF0015}Hata: {FFFFFF}Yazı yazmak iзin {00FF7F}`50`{FFFFFF} skor ve {00FF7F}`1 saat`{FFFFFF} online sьreniz olmalıdır! {00FF7F}/stats");
{
return 0;
}
Reply
#2

https://sampwiki.blast.hk/wiki/Control_Structures
Reply
#3

Quote:
Originally Posted by Stinged
View Post
long subject :/
Reply
#4

Try this:

Code:
if(GetPlayerScore(playerid) < 50 || (PlayerInfo[playerid][onlinet]+(gettime()-onlines[playerid])) < 3600) return SendClientMessage(playerid,-1,"{C9404E}<!> {FFFFFF} {FF0015}Hata: {FFFFFF}Yazı yazmak iзin {00FF7F}`50`{FFFFFF} skor ve {00FF7F}`1 saat`{FFFFFF} online sьreniz olmalıdır! {00FF7F}/stats");
{
return 0;
}
Reply
#5

Quote:
Originally Posted by K0P
View Post
Try this:

Code:
if(GetPlayerScore(playerid) < 50 || (PlayerInfo[playerid][onlinet]+(gettime()-onlines[playerid])) < 3600) return SendClientMessage(playerid,-1,"{C9404E}<!> {FFFFFF} {FF0015}Hata: {FFFFFF}Yazı yazmak iзin {00FF7F}`50`{FFFFFF} skor ve {00FF7F}`1 saat`{FFFFFF} online sьreniz olmalıdır! {00FF7F}/stats");
{
return 0;
}
error
Reply
#6

Quote:
Originally Posted by uqurlord13
View Post
long subject :/
Read just the if section.
https://sampwiki.blast.hk/wiki/Control_Structures#if

if statements don't work like that.

Quote:
Originally Posted by K0P
View Post
Try this:

Code:
if(GetPlayerScore(playerid) < 50 || (PlayerInfo[playerid][onlinet]+(gettime()-onlines[playerid])) < 3600) return SendClientMessage(playerid,-1,"{C9404E}<!> {FFFFFF} {FF0015}Hata: {FFFFFF}Yazı yazmak iзin {00FF7F}`50`{FFFFFF} skor ve {00FF7F}`1 saat`{FFFFFF} online sьreniz olmalıdır! {00FF7F}/stats");
{
return 0;
}
Adding a space wont make a difference.

You can't run a statement, stop it by returning something, and then run some code that's supposed to belong to it.
Reply
#7

You Have Very Big Text.
Try This.
PHP Code:
if(GetPlayerScore(playerid) < 50 || 
(
PlayerInfo[playerid][onlinet]+(gettime()-onlines[playerid])) < 3600
return 
SendClientMessage(playerid,-1,"{C9404E}<!> {FFFFFF} {FF0015}Hata: {FFFFFF}Yazı yazmak iзin {00FF7F}`50`{FFFFFF} skor ve {00FF7F}`1 saat`{FFFFFF} online sьreniz olmalıdır! {00FF7F}/stats");
{
return 
0;

Reply
#8

Quote:
Originally Posted by Pearson
View Post
You Have Very Big Text.
Try This.
PHP Code:
if(GetPlayerScore(playerid) < 50 || 
(
PlayerInfo[playerid][onlinet]+(gettime()-onlines[playerid])) < 3600
return 
SendClientMessage(playerid,-1,"{C9404E}<!> {FFFFFF} {FF0015}Hata: {FFFFFF}Yazı yazmak iзin {00FF7F}`50`{FFFFFF} skor ve {00FF7F}`1 saat`{FFFFFF} online sьreniz olmalıdır! {00FF7F}/stats");
{
return 
0;

E:\UGUR\Oyun\SLayeR Yeni\Mod\gamemodes\slayer.pwn(515 : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

Header size: 12964 bytes
Code size: 1717840 bytes
Data size: 3473744 bytes
Stack/heap size: 988000 bytes; estimated max. usage: unknown, due to recursion
Total requirements: 6192548 bytes

1 Warning.
Reply
#9

Oh my god... Read what I said.

The short solution is one of these (because I don't know what you want exactly):
Code:
if(GetPlayerScore(playerid) < 50 || (PlayerInfo[playerid][onlinet]+(gettime()-onlines[playerid])) < 3600) return SendClientMessage(playerid,-1,"{C9404E}<!> {FFFFFF} {FF0015}Hata: {FFFFFF}Yazı yazmak iзin {00FF7F}`50`{FFFFFF} skor ve {00FF7F}`1 saat`{FFFFFF} online sьreniz olmalıdır! {00FF7F}/stats");
Code:
if(GetPlayerScore(playerid) < 50 || (PlayerInfo[playerid][onlinet]+(gettime()-onlines[playerid])) < 3600)
{
return 0;
}
Reply
#10

Quote:
Originally Posted by Stinged
View Post
Oh my god... Read what I said.

The short solution is one of these (because I don't know what you want exactly):
Code:
if(GetPlayerScore(playerid) < 50 || (PlayerInfo[playerid][onlinet]+(gettime()-onlines[playerid])) < 3600) return SendClientMessage(playerid,-1,"{C9404E}<!> {FFFFFF} {FF0015}Hata: {FFFFFF}Yazı yazmak iзin {00FF7F}`50`{FFFFFF} skor ve {00FF7F}`1 saat`{FFFFFF} online sьreniz olmalıdır! {00FF7F}/stats");
Code:
if(GetPlayerScore(playerid) < 50 || (PlayerInfo[playerid][onlinet]+(gettime()-onlines[playerid])) < 3600)
{
return 0;
}
resolved but sendclientmessage ?
Reply
#11

Use the first one if you want to send the message.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)