AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Scripting question ? (https://forums.alliedmods.net/showthread.php?t=244295)

Awesome_man 07-16-2014 10:23

Scripting question ?
 
I have question in my mind.. Sorry as this is such a dumb question but please tell me

What are these numbers in differnt type of function like dis : -

ew name[18] new userid[18]
get_user_name(id, name, 32)

new players[ 32 ]

What are these numbers 18 18 32 32 ?

hleV 07-16-2014 11:08

Re: Scripting question ?
 
https://wiki.alliedmods.net/Pawn_tutorial#Arrays

fysiks 07-16-2014 15:19

Re: Scripting question ?
 
Just so you don't write code that will break, when using get_user_name() or any function that retrieves a string, you need to supply the maximum number of characters that the variable (array) can hold. To do this, you use charsmax()
PHP Code:

szName[32]
get_user_name(idszNamecharsmax(szName)) 



All times are GMT -4. The time now is 13:09.

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