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

get_clcmdsnum


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 10-13-2018 , 11:55   get_clcmdsnum
Reply With Quote #1

Hello, I noticed that get_clcmdsnum doesn't return the total amount of registered commands. Not sure, but maybe due the third parameter of register_clcmd (flags=-1) or I'm doing something wrong. Anyway, is there no forward that is called when a command is registered or way to fix that problem?

Code:
new iMaxSize = get_clcmdsnum(ADMIN_ALL); for (new i = 0; i < iMaxSize; i++) // something
__________________









Last edited by CrazY.; 10-13-2018 at 11:56.
CrazY. is offline
E1_531G
Senior Member
Join Date: Dec 2017
Old 10-13-2018 , 12:12   Re: get_clcmdsnum
Reply With Quote #2

You are right about flags = -1.
https://github.com/alliedmodders/amx...pp#L1618-L1629
Cmds with flags = -1 are not listable.
__________________
My English is A0
E1_531G is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 10-13-2018 , 12:33   Re: get_clcmdsnum
Reply With Quote #3

This could be fixed in the current version of amxx or at least make 0 as an default instead of -1 in amxmodx.inc.
__________________









Last edited by CrazY.; 10-13-2018 at 12:36.
CrazY. 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:41.


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