Raised This Month: $32 Target: $400
 8% 

bind_pcvar_string


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PurposeLessx
Senior Member
Join Date: Jun 2017
Old 06-18-2018 , 14:17   bind_pcvar_string
Reply With Quote #1

Why I have this problem? And how I can fix it?

While I set cvar string, server shuts down. Not problem with register_cvar but there is a problem with create_cvar and bind_pcvar_string
PHP Code:
new pcvar create_cvar("amx_nextmap""");
bind_pcvar_string(pcvaramx_nextmapcharsmax(amx_nextmap));

new 
text[186];
format(text185"blabla");
set_cvar_string(amx_nextmaptext); 

Last edited by PurposeLessx; 06-18-2018 at 14:18.
PurposeLessx is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 06-18-2018 , 15:36   Re: bind_pcvar_string
Reply With Quote #2

amx_nextmap is already created by some AMXX plugin (mapchooser perhaps), isn't it? If you want to just retrieve it use get_cvar_pointer. Also is the amx_nextmap variable global? Show its definition.
__________________

Last edited by klippy; 06-18-2018 at 15:36.
klippy is offline
PurposeLessx
Senior Member
Join Date: Jun 2017
Old 06-18-2018 , 15:52   Re: bind_pcvar_string
Reply With Quote #3

Quote:
Originally Posted by KliPPy View Post
amx_nextmap is already created by some AMXX plugin (mapchooser perhaps), isn't it? If you want to just retrieve it use get_cvar_pointer. Also is the amx_nextmap variable global? Show its definition.
I am writing "Map Chooser" plugin. So I am creating this cvar.
Anyway I changed it to register_cvar. I guess there is nothing about them.
PurposeLessx is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-18-2018 , 22:28   Re: bind_pcvar_string
Reply With Quote #4

amx_nextmap is created in nextmap.amxx.
__________________
fysiks 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 01:12.


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