Jump to content
Sign in to follow this  
Valuater

ReDim 2 Dimensional array ?

Recommended Posts

Valuater

that works... thanks

now the second line ( i thought i could do it )

works

ReDim $CtrlIDC[uBound($CtrlIDC) + 1]

$CtrlIDC[uBound($CtrlIDC) - 1] = $event_function

not working

ReDim  $classIDs[$TMA][UBound($classIDs,2) + 1] ; this works
$classIDs[$TMA][UBound($classIDs,2) - 1] = $classes[$i] ; this errors

thx

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites
RazerM

ReDim  $classIDs[$TMA][UBound($classIDs,2) + 1] ; this works
$classIDs[$TMA][UBound($classIDs,2) - 1] = $classes[$i] ; this errors oÝ÷ Ú·¦zfÞ¯MúLÀ

Edited by RazerM

My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.

Share this post


Link to post
Share on other sites
Jos

lets step one back here....

How many "Columns" do you need in the array ?

You are adding a "column" every time to the array ... is that what you want ?

anyway... heres a portion of code that shows how it could work:

$TMA=0
DIM $classIDs[1][1]
ConsoleWrite('@@ Debug(3) : ubound($classIDs,2)-1 = ' & ubound($classIDs,2)-1 & @lf & '>Error code: ' & @error & @lf) ;### Debug Console
$classIDs[$TMA][ubound($classIDs,2)-1] = 0
For $x = 1 to 10
    ConsoleWrite('@@ Debug(7) : ubound($classIDs,2)= ' & ubound($classIDs,2) & @lf & '>Error code: ' & @error & @lf) ;### Debug Console
    ReDim  $classIDs[UBound($classIDs)][UBound($classIDs,2) + 1]
    ConsoleWrite('@@ Debug(8) : ubound($classIDs,2)= ' & ubound($classIDs,2) & @lf & '>Error code: ' & @error & @lf) ;### Debug Console
    $classIDs[$TMA][UBound($classIDs,2)-1] = $x  ; this errors
Next

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Valuater

so use

$classIDs[$TMA-1][UBound($classIDs,2) - 1] = $classes[$i]oÝ÷ Ûú®¢×­«p¢¹vØZK uàjº^&j|ªºB¢[¦Ê®¢×hʧyçbØ^jºÚËú®¢×víz0© zÛbaxer§µ«4ߤÌØ^Ø^¶ZÊ'¶º%±ú+y§!B³Mú
V¬±ë4¶§¶¢{k¢[*ºbÁ©íªê-jÍ7éÉZ²Â³MúLÀ4²²«-¦ºé¢±ê뢻ºÚ"µÍÌÍØÛÜÒQÖÉÌÍÕPWVÌHH  ÌÍØÛÜÒQÖÉÌÍÕPWVÕPÝ[
    ÌÍØÛÜÒQËWHÈÝ[ÛÝ[Ü]ÕRB

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites
RazerM

$classIDs[$TMA][0] = $classIDs[$TMA][UBound($classIDs,2)] ; total count for that GUI

That wont work because you cannot use the UBound, only UBound - 1


My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.

Share this post


Link to post
Share on other sites
SmOke_N

Wow, that's really confusing looking... Did you try:

$classIDs[$TMA][0] = UBound($classIDs, 2) - 1
?

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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  

×