Raised This Month: $ Target: $400
 0% 

[HELP] Why do "get_user" functions reflect value and not return value?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
unSeen
Member
Join Date: Sep 2008
Old 11-29-2009 , 12:24   [HELP] Why do "get_user" functions reflect value and not return value?
Reply With Quote #1

Hey everyone,
I wonder why the developers made the "get_user" functions as a void functions.

I mean why they've done:
(for example)
new szUserNick[33]
get_user_name(id, szUserName, 32)

and not:
new szUserNick[33]
szUserNick = get_user_name(id, 32)

anyone has any idea?

Thanks in advanced,
unSeen.
__________________
List of important things:
1. Respect you'r mother.
2. Respect you'r father.
3. Do not hit anyone.
4. Do not steal.
5. Do not flame.
7. You didn't see that there is no number 6.
8. You checked if number 7 is true.
9. You are laughing now.
10. You are double laughing because you understand the joke ;)
unSeen is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-29-2009 , 12:51   Re: [HELP] Why do "get_user" functions reflect value and not return value?
Reply With Quote #2

When the native fills a string, in most of cases the return value is the length of the string.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-29-2009 , 13:05   Re: [HELP] Why do "get_user" functions reflect value and not return value?
Reply With Quote #3

Quote:
and not:
new szUserNick[33]
szUserNick = get_user_name(id, 32)
Probably because it can't work like that.
__________________
Arkshine is offline
Old 11-29-2009, 15:48
AfteR.
This message has been deleted by AfteR.. Reason: bug
AfteR.
Veteran Member
Join Date: Dec 2008
Location: λ
Old 11-29-2009 , 17:24   Re: [HELP] Why do "get_user" functions reflect value and not return value?
Reply With Quote #5

PHP Code:
new szUserNick[33]
get_user_name(idszUserName32
isnt it

PHP Code:
new szUserNick[32]
get_user_name(idszUserName31
?
AfteR. is offline
addicted2sex
Senior Member
Join Date: May 2009
Location: localhost
Old 11-29-2009 , 18:39   Re: [HELP] Why do "get_user" functions reflect value and not return value?
Reply With Quote #6

Quote:
Originally Posted by AfteR. View Post
PHP Code:
new szUserNick[33]
get_user_name(idszUserName32
isnt it

PHP Code:
new szUserNick[32]
get_user_name(idszUserName31
?

lol ...
__________________
Let 7he gr0ovE r3Lease y0ur m!nd
addicted2sex is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-29-2009 , 19:24   Re: [HELP] Why do "get_user" functions reflect value and not return value?
Reply With Quote #7

Quote:
Originally Posted by AfteR. View Post
PHP Code:
new szUserNick[33]
get_user_name(idszUserName32
isnt it

PHP Code:
new szUserNick[32]
get_user_name(idszUserName31
?
Doesn't really matter which as long as the number in the function is one less than the dimension of the array.
__________________
fysiks is offline
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 13:41.


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