Raised This Month: $ Target: $400
 0% 

Warning: Unreachable code on line ...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bazhenov93
Veteran Member
Join Date: Oct 2010
Old 04-18-2012 , 00:00   Warning: Unreachable code on line ...
Reply With Quote #1

PHP Code:
public menu(id) {
    if(!
is_user_alive(id) && is_user_connected(id))
    
ColorChat(idBLUE"You must be alive to use this function")
    return 
PLUGIN_HANDLED;

    

    new 
menu menu_create("title...""handler")  
    
    
menu_additemmenu"some function...""1" )
    
menu_display(idmenu0)
    return 
PLUGIN_HANDLED 

if I remove the colorchat message, i don't get this error.. can anyone explain the difference and why? thanks

also using { and } i get errors
bazhenov93 is offline
rak
Veteran Member
Join Date: Oct 2011
Location: banned country
Old 04-18-2012 , 00:02   Re: Warning: Unreachable code on line ...
Reply With Quote #2

-.-

GOD!

READ TUTORIAL!

PHP Code:
 if(!is_user_alive(id) && is_user_connected(id)) {
    
ColorChat(idBLUE"You must be alive to use this function")
    return 
PLUGIN_HANDLED;

__________________

www.amxmodx-es.com

Steam: Luchokoldo

Last edited by rak; 04-18-2012 at 00:02.
rak is offline
Send a message via MSN to rak Send a message via Skype™ to rak
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-18-2012 , 03:58   Re: Warning: Unreachable code on line ...
Reply With Quote #3

Quote:
Originally Posted by bazhenov93 View Post
also using { and } i get errors
Lies!
__________________
fysiks is offline
bazhenov93
Veteran Member
Join Date: Oct 2010
Old 04-18-2012 , 04:01   Re: Warning: Unreachable code on line ...
Reply With Quote #4

Quote:
Originally Posted by fysiks View Post
Lies!
Don't talk to me in that tone

my mistake was this->

menu_additem( menu, "some function...", "1" )
menu_display(id, menu, 0)
return
PLUGIN_HANDLED
}
}
}
bazhenov93 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:55.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode