control array element "1" doesn't exist

This forum is meant for requesting technical support or reporting bugs.

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support

control array element "1" doesn't exist

Postby pkal » Sun Aug 31, 2008 6:10 pm

ok its my first topic as iam a new adventure maker user and iam trying some basic things with vba script.

here is my problem
i have a simple project with 3 frames.

its frame has a hotspot that when i click it a variable called MYSCORE takes a new value (ex MYSCORE = MYSCORE + 5)

as i want to see my score in every frame i used the:
i = Action.GetMergedTextIndex
Text(i).Caption="Your Score: "+CStr(MYSCORE)

so when i click all 3 hotspots i have the MYSCORE = 65
thats the point i want to END the game so i add to every one of 3 hotspots not only the MYSCORE = MYSCORE + number but another line with:
If MYSCORE = 65 then Action.GoToFrame "end"
where "end" is the the name of my fourth and last frame

so every works fine exept that when i reach 65 iam moved to "end" frame but also see that stupid message:
control array element "1" doesn't exist
which i don't know how to solve

Please if anyone can help my sent a reply.
Thanks
pkal
New Member
 
Posts: 1
Joined: Sun Aug 31, 2008 5:59 pm

Postby Jaked » Sun Aug 31, 2008 6:26 pm

Welcome to the forums,,, pkal... sorry. I don't know VBA Script.
My sig changes more often than Doctor Who (see your national BBC channel) regenarates into new melancholy actors. Oh look, Matt Smith! Gerard Butler! Colin Mochrie! That wolf from Twilight: New Moon!
User avatar
Jaked
Code Master
 
Posts: 729
Joined: Wed Jun 25, 2008 4:26 am

Postby mercedes » Sun Aug 31, 2008 9:04 pm

Welcome to the Forums..:)


Control Element 1 doesnt 'exist..Check your code and make sure you have (1) where it should be...Ex. Text(1) Hotspot(1)...Also if you have that code in your hotspots..I have to assume that you either have a Procedure or a Merged Frame...In the Merged Frame..check to make sure that in the Advanced of either frame or hotspot...that you have (1) in there as well..

It could also mean a missing procedure or missing variable,.. missing merged frame...Like you forgot to merge it..that sort of thing... check that first...:)

I see you have (i) in the code up there.....Pretty sure that might be it..If you have (i) there..u may have it somewhere else..

Peace
Last edited by mercedes on Mon Sep 01, 2008 9:48 am, edited 1 time in total.
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Lyberodoggy » Mon Sep 01, 2008 9:38 am

If you have used the code to display the score in the end frame too, but you haven't merged it with the score frame, that's what is causing the problem

Control array element 1 definitely refers to the merged text since you said you can't write complex scripts and only complex scripts use objects, which could also have something to do with this.

Were have you input the code for displaying the score?
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests