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

Solved Store methodmap inside Array


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
oeN.
Junior Member
Join Date: Apr 2018
Old 04-11-2018 , 15:44   Store methodmap inside Array
Reply With Quote #1

Hi,

Is it possible to store methodmaps into Array (adt_array)?
Equivalent to AMXX Pawn version:
PHP Code:
enum _:Data{
    
Index,
    
Name[33]
}

Array:
dataArray;
dataArray CreateArray(Data);
new 
data[Data];
data[Index] = 123;
data[Name] = "foobar";
ArrayPushArray(dataArraydata); 

Last edited by oeN.; 04-12-2018 at 07:15.
oeN. is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 04-11-2018 , 18:24   Re: Store methodmap inside Array
Reply With Quote #2

A methodmap doesn't have any data storage, there would be nothing to store.
__________________
asherkin is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 04-11-2018 , 19:30   Re: Store methodmap inside Array
Reply With Quote #3

Assuming he actually meant using enums to simulate structs rather than "methodmaps," it works (besides any bugs regarding working with strings).
Fyren is offline
hmmmmm
Great Tester of Whatever
Join Date: Mar 2017
Location: ...
Old 04-12-2018 , 04:37   Re: Store methodmap inside Array
Reply With Quote #4

You can by using PushArray https://sm.alliedmods.net/new-api/ad...List/PushArray
hmmmmm is offline
oeN.
Junior Member
Join Date: Apr 2018
Old 04-12-2018 , 07:14   Re: Store methodmap inside Array
Reply With Quote #5

ArrayList.Push worked.

Thanks.
oeN. 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 21:41.


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