Raised This Month: $12 Target: $400
 3% 

ArrayFindString problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 01-02-2021 , 12:13   ArrayFindString problem
Reply With Quote #1

Hello,
Today I was trying to search for a string that was passed in a dynamic array, but this native seems to not working properly.

This is the test function registered as a clcmd in plugin_init():
PHP Code:
public clcmd_test(id)
{
    new 
arg[48];

    
read_argv(1argcharsmax(arg));
    
remove_quotes(arg);

    
client_print_color(idprint_chat"Array Index: %d"ArrayFindString(g_aValuesarg));

    return 
PLUGIN_HANDLED;

It is returning me every time value "-1" instead of array item index.
After some debugging, I tried to pass an exactly value from the Array, it retured -1.

Is this a native bug?
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]
Shadows Adi is offline
 



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 10:23.


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