warning 225: unreachable code Problem
#3

Quote:
Originally Posted by Eoussama
Посмотреть сообщение
That was painful to look at, please learn to write readable code.
PHP код:
if( newkeys == KEY_SECONDARY_ATTACK //55589 

    if( 
IsPlayerInRangeOfPointplayerid3.01480.9410,-1771.8586,18.7958 ) )
    { 
        
SetPlayerPosplayerid386.2978,173.8582,1008.3828 );  
        
SetPlayerInteriorplayerid15 ); 
        
GameTextForPlayerplayerid"Welcome to city hall"3000);  
        
        return 
1
    } 

if( 
newkeys == KEY_SECONDARY_ATTACK )  

    if( 
IsPlayerInRangeOfPointplayerid3.0386.2978,173.8582,1008.3828 ) )
    {
        
SetPlayerPosplayerid1480.9410,-1771.8586,18.7958 );  
        
SetPlayerInteriorplayerid0);  
        
GameTextForPlayerplayerid"Goodbye"3000); 
        
        return 
1
    } 

return 
1
Make sure to check up this https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
It contains useful information on how to properly detect Keys, scroll down, you'll find read macros for that.
Yeah i tryed all, now 26 erors
PHP код:
script.pwn(12077) : error 004: function "LoadDrugSystem" is not implemented
  script
.pwn(12078) : error 004: function "LoadMatsSystem" is not implemented
  script
.pwn(12079) : error 004: function "LoadTrunk" is not implemented
  script
.pwn(20268) : error 004: function "ini_GetKey" is not implemented
  script
.pwn(20268) : error 033: array must be indexed (variable "keytmp")
  
script.pwn(20271) : error 004: function "ini_GetValue" is not implemented
  script
.pwn(20271) : error 033: array must be indexed (variable "valtmp")
  
script.pwn(20280) : error 004: function "ini_GetKey" is not implemented
  script
.pwn(20280) : error 033: array must be indexed (variable "key")
  
script.pwn(20281) : error 004: function "ini_GetValue" is not implemented
  script
.pwn(20281) : error 033: array must be indexed (variable "val")
  
script.pwn(20282) : error 004: function "ini_GetValue" is not implemented
  script
.pwn(20282) : error 033: array must be indexed (variable "val")
  
script.pwn(20283) : error 004: function "ini_GetValue" is not implemented
  script
.pwn(20283) : error 033: array must be indexed (variable "val")
  
script.pwn(20284) : error 004: function "ini_GetValue" is not implemented
  script
.pwn(20284) : error 033: array must be indexed (variable "val")
  
script.pwn(20285) : error 004: function "ini_GetValue" is not implemented
  script
.pwn(20285) : error 033: array must be indexed (variable "val")
  
script.pwn(20286) : error 004: function "ini_GetValue" is not implemented
  script
.pwn(20286) : error 033: array must be indexed (variable "val")
  
script.pwn(20287) : error 004: function "ini_GetValue" is not implemented
  script
.pwn(20287) : error 033: array must be indexed (variable "val")
  
script.pwn(20288) : error 004: function "ini_GetValue" is not implemented
  script
.pwn(20288) : error 033: array must be indexed (variable "val")
  
script.pwn(20289) : error 004: function "ini_GetValue" is not implemented
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
26 Errors

Reply


Messages In This Thread
warning 225: unreachable code Problem - by RoX123 - 10.09.2017, 18:58
Re: warning 225: unreachable code Problem - by Eoussama - 10.09.2017, 19:01
Re: warning 225: unreachable code Problem - by RoX123 - 10.09.2017, 19:08
Re: warning 225: unreachable code Problem - by silverms - 10.09.2017, 19:55
Re: warning 225: unreachable code Problem - by RoX123 - 10.09.2017, 20:04
Re: warning 225: unreachable code Problem - by AmarPlayer - 10.09.2017, 21:17
Re: warning 225: unreachable code Problem - by RoX123 - 10.09.2017, 22:38
Re: warning 225: unreachable code Problem - by TakeiT - 10.09.2017, 22:53
Re: warning 225: unreachable code Problem - by RoX123 - 10.09.2017, 23:07
Re: warning 225: unreachable code Problem - by JasonRiggs - 11.09.2017, 00:02

Forum Jump:


Users browsing this thread: 2 Guest(s)