Raised This Month: $ Target: $400
 0% 

Solved ArrayGetString problem.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 06-22-2020 , 19:03   ArrayGetString problem.
Reply With Quote #1

Hello,
Everytime I select a certain item in menu, it throws me this error:
PHP Code:
L 06/23/2020 00:58:11Invalid index 245 (count99)
L 06/23/2020 00:47:40: [AMXXRun time error 10native error (native "ArrayGetString")
L 06/23/2020 00:47:40: [AMXX]    [0csgoremake_nvault.sma::_GetItemName (line 1960)
L 06/23/2020 00:47:40: [AMXX]    [1csgoremake_nvault.sma::item_menu_handler (line 2857
It throws me this error everytime I select a Key or a Case, but it throws correctly items from Array.

Here is GetItemName stock:
Code:
stock _GetItemName(item, temp[], len) {     switch (item)     {         case -12:         {             formatex(temp, len, "Key");         }         case -11:         {             formatex(temp, len, "Case");         }         default:         {             ArrayGetString(g_aSkinName, item, temp, len);         }     } }

and here is menu handler:

Code:
public item_menu_handler(id, menu, item) {     if (item == MENU_EXIT)     {         menu_destroy(menu);         return PLUGIN_HANDLED;     }     new itemdata[6];     new dummy;     new index;     new namei[64];     new CallBack;     menu_item_getinfo(menu, item, dummy, itemdata, charsmax(itemdata), namei, charsmax(namei), CallBack);     index = itemdata[0];     if (index == -10)     {         menu_destroy(menu);         return PLUGIN_HANDLED;     }     new szItem[32];     g_iUserSellItem[id] = index;     _GetItemName(index, szItem, charsmax(szItem));     client_print_color(id, id, "^4%s^1 You have selected %s", CSGO_TAG, szItem);     client_cmd(id, "messagemode Price");     client_print_color(id, id, "^4%s^1 Set its price!", CSGO_TAG);     return PLUGIN_HANDLED; }
__________________


Accepting Paid Requests, contact PM.

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

Last edited by Shadows Adi; 06-24-2020 at 10:49.
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 17:15.


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