Raised This Month: $51 Target: $400
 12% 

Client Connnect v1.0


Post New Thread Reply   
 
Thread Tools Display Modes
dorin2oo7
Senior Member
Join Date: Jun 2008
Location: Sibiu, Romania
Old 04-06-2009 , 06:01   Re: Client Connnect v1.0
Reply With Quote #21

I'm sorry but this I don't know how to make it. I am a very starter in scripting and I'm not sure how to make this enable cvar to work
__________________
dorin2oo7 is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 04-06-2009 , 07:26   Re: Client Connnect v1.0
Reply With Quote #22

Quote:
Originally Posted by Nextra View Post
How would this change anything?
because if you use
PHP Code:
if(get_pcvar_num(something) != 1)
{
      return;

he ask you for another return, and if you use directly another return is not necessary
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 04-06-2009 , 08:35   Re: Client Connnect v1.0
Reply With Quote #23

Quote:
Originally Posted by tuty View Post
because if you use
PHP Code:
if(get_pcvar_num(something) != 1)
{
      return;

he ask you for another return, and if you use directly another return is not necessary
As long as you are not returning a value the compiler won't tell you "This function has to return a value.", therefore doing a return to abort the function is perfectly fine if it is your preference of style or is not even avoidable due to the structure of the function.
__________________
In Flames we trust!
Nextra is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 04-06-2009 , 08:45   Re: Client Connnect v1.0
Reply With Quote #24

Code:
As long as you are not returning a value the compiler won't tell you "This function has to return a value.", therefore doing a return to abort the function is perfectly fine if it is your preference of style or is not even avoidable due to the structure of the function.

oh, okay then
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 04-06-2009 , 08:48   Re: Client Connnect v1.0
Reply With Quote #25

dorin2oo7: Stop posting plugins if you can't support them or optimize them. Your use of getPrefix is unneeded. Just get the cvar's value within the function. Also, the cvar is kind of pointless in my eyes. Make it a define or just hardcode it instead. If the user wants to change it, they can recompile it after they change it. I don't think it should be a cvar (this goes with all of your recent plugins)


Nextra: Wrong. If the function contains 1 return command, it will expect a return command at the end of the command as well.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 04-06-2009 , 13:01   Re: Client Connnect v1.0
Reply With Quote #26

Quote:
Originally Posted by YamiKaitou View Post
Nextra: Wrong. If the function contains 1 return command, it will expect a return command at the end of the command as well.
I use return to abort functions in most the plugins I'm writing (including both of the ones approved here). I never had a warning when doing that.
__________________
In Flames we trust!
Nextra is offline
dorin2oo7
Senior Member
Join Date: Jun 2008
Location: Sibiu, Romania
Old 04-06-2009 , 16:57   Re: Client Connnect v1.0
Reply With Quote #27

I was hoping to learn some little more about the plugins. I'm sorry if I can't support the plugins as should
__________________
dorin2oo7 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-21-2009 , 20:14   Re: Client Connnect v1.0
Reply With Quote #28

Quote:
Originally Posted by tuty View Post
already made a lot of this kind of plugins
Unapproved.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 17:30.


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