AlliedModders

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

PurposeLessx 06-18-2018 14:17

bind_pcvar_string
 
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); 


klippy 06-18-2018 15:36

Re: bind_pcvar_string
 
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.

PurposeLessx 06-18-2018 15:52

Re: bind_pcvar_string
 
Quote:

Originally Posted by KliPPy (Post 2597789)
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.

fysiks 06-18-2018 22:28

Re: bind_pcvar_string
 
amx_nextmap is created in nextmap.amxx.


All times are GMT -4. The time now is 12:45.

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