Raised This Month: $ Target: $400
 0% 

Convert cvar in number


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
.MMYTH.
BANNED
Join Date: Sep 2010
Location: Brasil - RS
Old 01-09-2011 , 14:20   Convert cvar in number
Reply With Quote #1

I want to convert a cvar into a number, to service an array:

PHP Code:
new g_maxcaracter

public plugin_init()
{
    
g_maxcaracter register_cvar("maxcaracteres""100")
}

public 
abc(id)
{
    new 
argv[get_pcvar_num(g_maxcaracter)]

But don't compile, I test with sizeof, str_to_num and nothing...
If somemone can help me...
.MMYTH. is offline
Send a message via MSN to .MMYTH.
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-09-2011 , 14:22   Re: Convert cvar in number
Reply With Quote #2

You can't do that. It needs a constant value. You can do that only with the dynamic arrays.
__________________
Arkshine is offline
.MMYTH.
BANNED
Join Date: Sep 2010
Location: Brasil - RS
Old 01-09-2011 , 14:23   Re: Convert cvar in number
Reply With Quote #3

OK, thanks...
.MMYTH. is offline
Send a message via MSN to .MMYTH.
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 01:58.


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