lsakizada Posted December 20, 2007 Share Posted December 20, 2007 Yes it is me again, I am working all night to create for my boss script that supposed to be finished as for this morning ... I have two dim array that populated many times with data. I need to erase it each time it populated with new serios of data. According to the document it should be set to zero. but it is not working for me. Global $aBSCData[2][12] I am erasing it this way: aBSCData=0 What's wrong with that? Be Green Now or Never (BGNN)! Link to comment Share on other sites More sharing options...
xzaz Posted December 20, 2007 Share Posted December 20, 2007 _ArrayDelete() Dosn't work? Small Color Picker v0.2 | Travian bot Link to comment Share on other sites More sharing options...
lsakizada Posted December 20, 2007 Author Share Posted December 20, 2007 _ArrayDelete() Dosn't work?No, it is done for single dimmension Be Green Now or Never (BGNN)! Link to comment Share on other sites More sharing options...
Kerros Posted December 20, 2007 Share Posted December 20, 2007 I tried this, and it seemed to work in my case. #include<array.au3> global $aBSCData[2][12] for $icc = 1 to 11 $aBSCData[0][$icc] = $icc $aBSCData[1][$icc] = $icc next _ArrayDisplay($aBSCData) $aBSCData= 0 MsgBox(0,"",$aBSCData) _ArrayDisplay($aBSCData);<===Will not display if $aBSCData is not an array It isn't by chance that you are missing the $ in front of $aBSCData= 0 Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance. Link to comment Share on other sites More sharing options...
lsakizada Posted December 21, 2007 Author Share Posted December 21, 2007 (edited) It is delete the array but not erase the content.It isn't by chance that you are missing the $ in front of $aBSCData= 0No, it is paste problem. Edited December 21, 2007 by lsakizada Be Green Now or Never (BGNN)! Link to comment Share on other sites More sharing options...
weaponx Posted December 21, 2007 Share Posted December 21, 2007 Look at this example: Dim $array[1] = ["TEST"] $array[0] = "Change element" ConsoleWrite("Element 0: " & $array[0] & @CRLF) Dim $array[1] ConsoleWrite("Element 0: " & $array[0]) Redim is nondestructive if you are increasing the size of the array. Dim will destroy the array, regardless of how many dimensions there are. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now