Unreachable Code.
#1

Код:
C:\Users\Parent\Desktop\STUFF\Test\gamemodes\Roleplay.pwn(4258) : warning 225: unreachable code
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Код:
    if(strcmp(cmd, "/buyvehicle", true) == 0)
What causes this ?
Reply
#2

I'd guess you have a return 1/0 right before that line, maybe you forgot to close the bracket of the last cmd.
unreachable code means, that you got code after e.g. a return, so this wont be called, because the return ends the function before.
Reply
#3

Код:
               }
               return 1;
            }
			else { return 1; }
		}
		return 1;
	}
//==============================================================================
	if(strcmp(cmd, "/buyvehicle", true) == 0)
thats what i have

Edit : Solved the last command was a fucked it was like //=============if(strcmp(cmd, "/vehicle", true) == 0)
Reply
#4

Show us whole your OnPlayerCommandText (pastebin).
Reply
#5

I think the changing of the position of last bracket before the error-line should fix it.

Edit, sry didnt see his edit
Reply
#6

Unreachable code:

1.
return 1;
SendClientMessage;
2.
return 1;
}
return 1;
}
return 1;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)