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

Vector of strings


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ghostdlr
Senior Member
Join Date: Aug 2010
Old 08-27-2010 , 07:09   Vector of strings
Reply With Quote #1

How do I define and use a vector of strings ?

I tried defining it as a matrix but it's not working
ghostdlr is offline
ghostdlr
Senior Member
Join Date: Aug 2010
Old 08-27-2010 , 12:01   Re: Vector of strings
Reply With Quote #2

Never mind

Last edited by ghostdlr; 08-27-2010 at 12:19.
ghostdlr is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-27-2010 , 12:09   Re: Vector of strings
Reply With Quote #3

By the way, you are not in the SourceMod section. ;)
__________________
Arkshine is offline
ghostdlr
Senior Member
Join Date: Aug 2010
Old 08-27-2010 , 12:19   Re: Vector of strings
Reply With Quote #4

I want to know how I can declare an array of strings in amxmodx .
ghostdlr is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-27-2010 , 12:21   Re: Vector of strings
Reply With Quote #5

Code:
new myArray[][] = 
{
    "string1",
    "string2",
    "..."
}
__________________
Arkshine is offline
ghostdlr
Senior Member
Join Date: Aug 2010
Old 08-27-2010 , 12:26   Re: Vector of strings
Reply With Quote #6

Isn't there another way ?

What if I want an array with a variable number of strings ?
ghostdlr is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-27-2010 , 12:27   Re: Vector of strings
Reply With Quote #7

You need to use dynamic array. See cellarray.inc in includes/
__________________
Arkshine is offline
ghostdlr
Senior Member
Join Date: Aug 2010
Old 08-27-2010 , 12:32   Re: Vector of strings
Reply With Quote #8

Thanks
ghostdlr 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 15:01.


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