Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - D3M0NCHR15

Pages: [1]
1
Chatterbox / Re: You know what to do
« on: May 08, 2012, 08:12:21 AM »
Sarah Palin.. she think she's hot.. she's most certainly not.. and plus there's a pic of her with Eminem which is grotesque

2
Off-Topic Discussion / Re: General Chatter Thread
« on: March 13, 2012, 10:32:43 AM »
Hey guys, how's it going?

I'm having a little bit of trouble with Visual Basic.

I'm trying to work an array with a variable, you know, like name(i), i having a value that gets set at the beginning

But, to do a For loop to loop for the number of times equal to i, I called up another element, n. n is an integer like i

The lecture slides say it's okay to do this. In fact, here's its example:


For i = 1 to num_tracks
   names(i) = InputBox(“Name of track ” & i)
   times(i) = InputBox(“Time for track ” & i)
   total_time = total_time + times(i)
Next

next to my current code for this part:

        For n = 1 To i
            'Get runner's name
            '====================
            name(n) = InputBox("Input runner " & n & "'s name")

            'Get a time for each lap
            '====================
            lap1(n) = InputBox("Input the time for " & name(n) & "'s first lap")
            lap2(n) = InputBox("Input the time for " & name(n) & "'s second lap")
        Next


I run a debug test and it gives me an IndexOutOfRangeException and says "Index was outside the bounds of the array"


Here's my full code, btw


Public Class Form1

    Private Sub btnStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStart.Click
        '====================
        'Coursework 2012 Program
        'by Student 09001219
        '08/03/2012
        '====================

        'Calling elements and arrays
        '====================
        Dim valid As Boolean
        Dim i As Integer
        Dim n As Integer
        Dim name(i) As String
        Dim lap1(i) As Integer
        Dim lap2(i) As Integer

        'Get valid number of runners
        '====================
        valid = False
            While valid = False
                i = InputBox("Input a number between 2 and 8")
                If i >= 2 Then
                    If i <= 8 Then
                        valid = True
                    End If
                End If
        End While

        'Loop for number of runners
        '====================
        For n = 1 To i
            'Get runner's name
            '====================
            name(n) = InputBox("Input runner " & n & "'s name")

            'Get a time for each lap
            '====================
            lap1(n) = InputBox("Input the time for " & name(n) & "'s first lap")
            lap2(n) = InputBox("Input the time for " & name(n) & "'s second lap")
        Next
        MsgBox("This is one of those boxes you get that proves you've got this far without issue")
    End Sub
End Class

erm...  :baby_smily:... :idea2:.........nope it's gone............ah who am I kidding? I HATE PROGRAMMING...... I CAN NEVER UNDERSTAND IT (give me 2 years on a project then I'll be sussed)

3
Off-Topic Discussion / Re: General Chatter Thread
« on: March 13, 2012, 10:19:26 AM »
It is now  currently snowing in the pacific northwest.
In March.
Wat.

Don't worry, I had snow in May 2011 where I live... maybe part of an aftermath of a big freeze we had from December 2010-February 2011

4
Existing Games / Re: Pokemon Thread
« on: March 11, 2012, 03:58:37 PM »
Pokemon only count after you get Pokeballs
Uhm no. First encounter is first encounter, no matter if you have pokeballs or not. Don't have them? Too bad.

I'm doing a Nuzlocke run on Sapphire. Lets say that things haven't all gone as planned.

That's true but in order to get full info on Pokemon, you need to catch it...

that link again if you want to see me play Ruby https://join.me/441-615-149

5
Existing Games / Re: Pokemon Thread
« on: March 11, 2012, 03:46:14 PM »
just the thread :D.. if you want to see me play Pokemon Ruby, go to this link

https://join.me/441-615-149

I will be doing webcam pictures as well... I apologize for any lag you may encounter

6
Existing Games / Re: Halo reach
« on: March 09, 2012, 06:30:41 AM »
Halo reach is the best game in the series :3

7
Off-Topic Discussion / Re: General Chatter Thread
« on: March 06, 2012, 10:02:04 AM »
(Image removed from quote.)

I want this teacher

Which Justin Bieber hater wouldn't.  I WOULD LOVE TO HAVE THIS TEACHER AS WELL!!!

8
Existing Games / Re: Minecraft.
« on: March 01, 2012, 01:57:55 PM »
Hey, erm... any ideas of what I can possibly craft in Minecraft - Pocket Edition? I'll take in requests but I am limited in colours so...

9
Existing Games / Re: Minecraft.
« on: February 26, 2012, 04:03:11 PM »
I LOVE MINECRAFT!!! I have it on my iPod Touch... it's not as good as the PC version but I can't complain

10
Existing Games / Re: Call of Duty Series
« on: February 24, 2012, 03:45:27 AM »
ok, I admit that I like this game series but WHY HAVE THE GRAPHICS NOT CHANGED

11
Existing Games / Re: Call of Duty Series
« on: February 24, 2012, 03:44:11 AM »
Can someone please tell me for the love of God what's so "AMAZING" about a game series that hasn't changed in 5 years/games and is very likely to be the same for the 6th?

Pages: [1]