Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Jezzball Help - Arrays
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Mr. T




PostPosted: Mon Oct 17, 2005 5:50 pm   Post subject: Jezzball Help - Arrays

I incorporated an array of coordinates for the creation of walls...but the array does not seem to add an new element to itself, even though I used the new function. Can anyone figure out why?


JezzballHacks22.t
 Description:

Download
 Filename:  JezzballHacks22.t
 Filesize:  7.67 KB
 Downloaded:  133 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
bass_maniac




PostPosted: Tue Oct 18, 2005 11:57 am   Post subject: (No subject)

This would be because you are using the 'upper' command. With 'new' you don't need to.

Instead of
code:
new name, upper (name) + 1

just put
code:
new name, newUpper

You'll need to make an variable to hold the value of newUpper. Here's what I added:

At the top,
code:
var increase := 0

in wall creation,
code:
if left = 1 and whatdotcolour (barX, barY) not= blue then
            a := 0
            b := 0
            button := 0
            increase += 1
            new boxArray, increase
[Gandalf]




PostPosted: Tue Oct 18, 2005 2:38 pm   Post subject: (No subject)

Not quite, upper(array) + 1 will give the same result, cause less clutter and make the program more efficient.
Mr. T




PostPosted: Tue Oct 18, 2005 8:49 pm   Post subject: Alex's Opinion

Anyways, any solutions to my original post?
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: