Sign in to follow this  
Followers 0
darren_burgess

So whats up with this error message?

5 posts in this topic

So what is going on with this error?!?! Am I not understanding arrays? What is this error saying? Basically I want $nowAdd to equal the 5th position in the $answerTimeArray array. I am stumped. Darren

******

C:\Documents and Settings\Darren\Desktop\record_audio_new.au3 (224) : ==> Error in expression.:

$nowAdd = $answerTimeArray (5)

$nowAdd = ^ ERROR

******

Here is the relavant code declarations:

#include <Array.au3>

dim $nowAdd

dim $answerTimeArray

$answerTimeArray = _ArrayCreate (.3,.5,.3,.4,.5,.3,.5,.3,.3,.5,.3,.5)

and the code with the error:

Func get_answer_position () ; returns the x coordinanate of the position of the correct answer

Select

Case $loop-9 = 0 or $loop-9 = 12 or $loop-9 = 24 or $loop-9 = 36 or $loop-9 = 48 ; answer A

$AnswerPosition = $answerColumnArray (1)

Case $loop-10 = 0 or $loop-10 = 12 or $loop-10 = 24 or $loop-10= 36 or $loop-10 = 48 ; answer A#

$AnswerPosition = $answerColumnArray (2)

Case $loop-11 = 0 or $loop-11 = 12 or $loop-11 = 24 or $loop-11 = 36 or $loop-11= 48 ; answer B

$AnswerPosition = $answerColumnArray (3)

Case $loop = 0 or $loop = 12 or $loop = 24 or $loop = 36 or $loop = 48 ; answer C

$AnswerPosition = $answerColumnArray (4)

Case $loop-1 = 0 or $loop-1 = 12 or $loop-1 = 24 or $loop-1 = 36 or $loop-1 = 48 ; answer C#

$AnswerPosition = $answerColumnArray (5)

Case $loop-2 = 0 or $loop-2 = 12 or $loop-2 = 24 or $loop-2 = 36 or $loop-2 = 48 ; answer D

$AnswerPosition = $answerColumnArray (6)

Case $loop-3 = 0 or $loop-3 = 12 or $loop-3 = 24 or $loop-3 = 36 or $loop-3 = 48 ; answer D#

$AnswerPosition = $answerColumnArray (7)

Case $loop-4 = 0 or $loop-4 = 12 or $loop-4 = 24 or $loop-4 = 36 or $loop-4 = 48 ; answer E

$AnswerPosition = $answerColumnArray (8)

Case $loop-5 = 0 or $loop-5 = 12 or $loop-5 = 24 or $loop-5 = 36 or $loop-5 = 48 ; answer F

$AnswerPosition = $answerColumnArray (9)

Case $loop-6 = 0 or $loop-6 = 12 or $loop-6 = 24 or $loop-6 = 36 or $loop-6 = 48 ; answer F#

$AnswerPosition = $answerColumnArray (10)

Case $loop-7 = 0 or $loop-7 = 12 or $loop-7 = 24 or $loop-7 = 36 or $loop-7 = 48 ; answer G

$AnswerPosition = $answerColumnArray (11)

Case $loop-8 = 0 or $loop-8 = 12 or $loop-8 = 24 or $loop-8 = 36 or $loop-8 = 48 ; answer G#

$AnswerPosition = $answerColumnArray (12)

EndSelect

Return ($AnswerPosition)

EndFunc

Share this post


Link to post
Share on other sites



as far as i'm seeing the error line isnt even in here...


What goes around comes around... Payback's a bitch.

Share this post


Link to post
Share on other sites

Use square brackets not parenthesis. [5] not (5)


AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)

Share this post


Link to post
Share on other sites

Change all the

$answerColumnArray (1) oÝ÷ ÚÚºÚ"µÍÌÍØ[ÝÙÛÛ[[^VÌWH

Of course changing the 1 to whatever number. Arrays use brackets for elements rather than parentheses.

Share this post


Link to post
Share on other sites

Change all the

$answerColumnArray (1) oÝ÷ ÚÚºÚ"µÍÌÍØ[ÝÙÛÛ[[^VÌWH

Of course changing the 1 to whatever number. Arrays use brackets for elements rather than parentheses.

Jeez, so simple. Thank you so much for your help.

darren

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