SA-MP Forums Archive
Need some help! untrechable code and invaild expression,assumed zero(4 - 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: Need some help! untrechable code and invaild expression,assumed zero(4 (/showthread.php?tid=412089)



Need some help! untrechable code and invaild expression,assumed zero(4 - LuckyPlaya` - 31.01.2013

Here is my problem:

Код:
D:\Users\ROBERT\Desktop\AVS.pwn(1744) : warning 225: unreachable code
D:\Users\ROBERT\Desktop\AVS.pwn(1746) : error 029: invalid expression, assumed zero
D:\Users\ROBERT\Desktop\AVS.pwn(1746) : error 029: invalid expression, assumed zero
D:\Users\ROBERT\Desktop\AVS.pwn(1746) : error 029: invalid expression, assumed zero
D:\Users\ROBERT\Desktop\AVS.pwn(1746) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Here is the script part that couses problems...

Код:
if(strcmp(cmd,"/car",true)==0)//warning 225: unreachable code
if(IsPlayerConnected(playerid))//error 029: invalid expression, assumed zero (3x same error comes here)
Here is the pastebin version of whole FS..please try to find solution.

Код:
http://pastebin.com/3JbjKLQ2



Re: Need some help! untrechable code and invaild expression,assumed zero(4 - Bakr - 31.01.2013

The problem is quite clear...you are returning a value (that returned by CallLocalFunction) before the warning line. It is unreachable!

If you don't understand how it is unreachable, look through the pawn_lang.pdf for return statements (and honestly you should have looked there anyway to find the error/warning and how to fix it).


Re: Need some help! untrechable code and invaild expression,assumed zero(4 - LuckyPlaya` - 31.01.2013

Can you paste me the code part that i need to put in?


Re: Need some help! untrechable code and invaild expression,assumed zero(4 - Bakr - 31.01.2013

There is no code you need to put in, you would need to delete some! And I don't know why you added the code you did in there, as you probably don't know what it does. You should read pawn_lang.pdf before attempting any coding or editing.


Re: Need some help! untrechable code and invaild expression,assumed zero(4 - M3mPHi$_S3 - 01.02.2013

PHP код:
    if(strcmp(cmdtext,"/car",true)==0)//warning 225: unreachable code
    

Use this and just remove this
PHP код:
if(IsPlayerConnected(playerid)) 



Re: Need some help! untrechable code and invaild expression,assumed zero(4 - LuckyPlaya` - 01.02.2013

I did it like you sayd,but it still says the same 3x invaild expression ,assumed zero and unrechable code :/

-Any other solutions?