Minikori Posted October 22, 2008 Share Posted October 22, 2008 Hello, I'm declaring variables with a For...Next, but I get a syntax error whenever I execute the program. My code: $Colors = StringSplit("0xFF0000|0x0000FF|0x00FF00|0xFFFF00|0x000000|0xFFFFFF|0xAA00AA|0xFF00AA", "|") For $x = 1 To $Colors[0] Dim $ColorBut[$x] Dim $Color[$x] = $Colors[$x] Next I get a syntax error pointing to the first $ in $Colors[$x]. Anyone know why this is happening? For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com Link to comment Share on other sites More sharing options...
BrettF Posted October 22, 2008 Share Posted October 22, 2008 Well not sure what's meant to be happening. This works. Dim $Colors = StringSplit("0xFF0000|0x0000FF|0x00FF00|0xFFFF00|0x000000|0xFFFFFF|0xAA00AA|0xFF00AA", "|") Dim $ColorBut[$Colors[0]+1] Dim $color[$Colors[0]+1] For $x = 1 To $Colors[0] $Color[$x] = $Colors[$x] Next Maybe post your full code? Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! 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