Raised This Month: $ Target: $400
 0% 

warning 209: function "XX" should return a value


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AlexanderM
Junior Member
Join Date: Dec 2007
Old 01-02-2008 , 09:50   warning 209: function "XX" should return a value
Reply With Quote #1

Hi

As wroten at the title, i have this
warning 209: function "XX" should return a value
problem.

Im a litle new scripting plugins to Half Life, and ive had this
problems so meny times ive lost count on it.
Would help a lot if some one could help me, coes this is making
me psycho

Hope you can help me

Alexander

(sorry if some one already have posted how you do this
but i wasen't able to find a post complaning how to do this)

Last edited by AlexanderM; 01-02-2008 at 09:52.
AlexanderM is offline
Old 01-02-2008, 10:12
vl@d
This message has been deleted by Emp`. Reason: More complete answer given.
Old 01-02-2008, 10:17
YamiKaitou
This message has been deleted by Emp`. Reason: More complete answer given.
Old 01-02-2008, 10:20
Sn!ff3r
This message has been deleted by Emp`. Reason: More complete answer given.
Old 01-02-2008, 10:42
fxfighter
This message has been deleted by Emp`. Reason: More complete answer given.
AlexanderM
Junior Member
Join Date: Dec 2007
Old 01-02-2008 , 13:32   Re: warning 209: function "XX" should return a value
Reply With Quote #2

Thank you to all, happy for all the help
Long time since ive been on a so helpfull forum
AlexanderM is offline
AlexanderM
Junior Member
Join Date: Dec 2007
Old 01-02-2008 , 14:38   Re: warning 209: function "XX" should return a value
Reply With Quote #3

New prob, new post :-)

http://forums.alliedmods.net/showthr...289#post569289

Last edited by AlexanderM; 01-02-2008 at 16:16. Reason: A bit lazy...
AlexanderM is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 01-02-2008 , 23:25   Re: warning 209: function "XX" should return a value
Reply With Quote #4

function "XX" should return a value warning occurs when you return a value during the function, but you then you do not return a value later:

Code:
XX()
{
   if( something )
       return

    do_something()

   return value
}
that is one example that will give this warning. because it returns nothing but then later returns something. you also get the warning if the returns are switched.

*Note that if you do not have a return at the end of a function, then it interprets it as a return nothing.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Reply


Thread Tools
Display Modes

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 11:10.


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