Sign in to follow this  
Followers 0
PDowning

Arrays and Multi-dimensionals

4 posts in this topic

I take it that array's can't have a value that is non-numeric, correct?  If not then that is gonna lead to a slight problem with my next little script I want to do.  Basically something like this:

Global $aListing[72][2] = [[118, AUD], [123, BNK],

etc...  till I fill up all 72 segments.   Th point will be to compare the pc's ip address to the first portion of the array, then take the 2nd half of the array(the site id) and use it later in the script.  But I get a great big red Syntax Error.  The only other way I can think of doing it is to get the ip address, strip out the 2nd octet and use a metric crap-ton of if .. else statements to do what I want, but that it not efficient nor clean coding. Any other ideas?

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

You need to "quote" your strings :)

 

Yeh, I just figured that out while waiting for a response. I'll do that and see what happens. Thanks

Edit:  Do I need to increase the 2nd portion of the array from 2 to something else?

Edit2: Nope I do not need to change the 2nd value of the array.

Edited by PDowning

Share this post


Link to post
Share on other sites

Please take a look at the helpfile/forum next time ;)


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0