Results 1 to 10 of 10
  1. #1
    gwentravolta's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Location
    A cardboard Box
    Posts
    311
    Reputation
    9
    Thanks
    46

    Random Integer Error? I think?

    First of all, my gf has a wierd obsession with cones. don't ask.
    My "Epilepsy" button isn't working right, and I was hoping someone here could tell me what is wrong with it.

    Screen Shot:


    Virus Scan!

    Code:
    Code:
    Public Class Form1
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Dim afd As Integer
            Form2.Show()
            EpiOff.Hide()
            afd = 1
        End Sub
    
        Private Sub CC_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CC.Click
            Dim rgb1, rgb2, rgb3 As Integer
            If TextBox1.Text = "" Then
                TextBox1.Text = "0"
            End If
            If TextBox2.Text = "" Then
                TextBox2.Text = "0"
            End If
            If TextBox3.Text = "" Then
                TextBox3.Text = "0"
            End If
    
            rgb1 = TextBox1.Text
            rgb2 = TextBox2.Text
            rgb3 = TextBox3.Text
    
            If rgb1 > 255 Or rgb1 < 0 Then
                rgb1 = 255
                TextBox1.Text = rgb1
            End If
            If rgb2 > 255 Or rgb2 < 0 Then
                rgb2 = 255
                TextBox2.Text = rgb2
            End If
            If rgb3 > 255 Or rgb3 < 0 Then
                rgb3 = 255
                TextBox3.Text = rgb3
            End If
    
            Form2.BackColor = Color.FromArgb(rgb1, rgb2, rgb3)
        End Sub
    
        Private Sub CL_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CL.Click
            Dim xloc, yloc As Integer
            If TextBox4.Text = "" Then
                TextBox4.Text = "0"
            End If
            If TextBox5.Text = "" Then
                TextBox5.Text = "0"
            End If
    
            xloc = TextBox4.Text
            yloc = TextBox5.Text
    
            If xloc < 0 Then
                xloc = 0
                TextBox4.Text = xloc
            End If
            If yloc < 0 Then
                yloc = 0
                TextBox5.Text = yloc
            End If
    
            Form2.Location = New Point(xloc, yloc)
        End Sub
    
        Private Sub CS_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CS.Click
            Dim xsize, ysize As Integer
            If TextBox6.Text = "" Then
                TextBox6.Text = "0"
            End If
            If TextBox7.Text = "" Then
                TextBox7.Text = "0"
            End If
    
            xsize = TextBox6.Text
            ysize = TextBox7.Text
    
            If xsize < 0 Then
                xsize = 0
                TextBox6.Text = xsize
            End If
            If ysize < 0 Then
                ysize = 0
                TextBox7.Text = ysize
            End If
    
            Form2.Size = New Size(xsize, ysize)
        End Sub
    
        Private Sub rand_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rand.Click
            Dim rgb1, rgb2, rgb3 As Integer
            Randomize()
            rgb1 = Int(Rnd() * 1000)
            While rgb1 > 255
                rgb1 = Int(Rnd() * 1000)
            End While
            TextBox1.Text = rgb1
    
            rgb2 = Int(Rnd() * 1000)
            While rgb2 > 255
                rgb2 = Int(Rnd() * 1000)
            End While
            TextBox2.Text = rgb2
    
            rgb3 = Int(Rnd() * 1000)
            While rgb3 > 255
                rgb3 = Int(Rnd() * 1000)
            End While
            TextBox3.Text = rgb3
    
            Form2.BackColor = Color.FromArgb(rgb1, rgb2, rgb3)
        End Sub
    
        Public Sub Epi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Epi.Click
            Dim afd, rgb1, rgb2, rgb3 As Integer
            afd = 0
            Epi.Hide()
            EpiOff.Show()
            While afd = 0
                Randomize()
                rgb1 = Int(Rnd() * 1000)
                While rgb1 > 255
                    rgb1 = Int(Rnd() * 1000)
                End While
                TextBox1.Text = rgb1
    
                rgb2 = Int(Rnd() * 1000)
                While rgb2 > 255
                    rgb2 = Int(Rnd() * 1000)
                End While
                TextBox2.Text = rgb2
    
                rgb3 = Int(Rnd() * 1000)
                While rgb3 > 255
                    rgb3 = Int(Rnd() * 1000)
                End While
                TextBox3.Text = rgb3
    
                Form2.BackColor = Color.FromArgb(rgb1, rgb2, rgb3)
            End While
        End Sub
    
        Public Sub EpiOff_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EpiOff.Click
            Dim afd As Integer
            afd = 1
            EpiOff.Hide()
            Epi.Show()
        End Sub
    End Class
    And the Program:


    Posts:
    10 posts []
    50 posts []
    100 posts []
    500 posts []

    Thanks:
    5 thanks []
    10 thanks []
    100 thanks []

    Profile:
    Make a signature []
    Set a profile picture []

    Hacks:
    Download and use a hack []
    Get a virus []
    ... or two... []
    Release my own hacks []



  2. #2
    trevor206's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Posts
    324
    Reputation
    12
    Thanks
    107
    Quote Originally Posted by gwentravolta View Post
    First of all, my gf has a wierd obsession with cones. don't ask.
    My "Epilepsy" button isn't working right, and I was hoping someone here could tell me what is wrong with it.

    Screen Shot:


    Virus Scan!

    Code:
    Code:
    Public Class Form1
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Dim afd As Integer
            Form2.Show()
            EpiOff.Hide()
            afd = 1
        End Sub
    
        Private Sub CC_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CC.Click
            Dim rgb1, rgb2, rgb3 As Integer
            If TextBox1.Text = "" Then
                TextBox1.Text = "0"
            End If
            If TextBox2.Text = "" Then
                TextBox2.Text = "0"
            End If
            If TextBox3.Text = "" Then
                TextBox3.Text = "0"
            End If
    
            rgb1 = TextBox1.Text
            rgb2 = TextBox2.Text
            rgb3 = TextBox3.Text
    
            If rgb1 > 255 Or rgb1 < 0 Then
                rgb1 = 255
                TextBox1.Text = rgb1
            End If
            If rgb2 > 255 Or rgb2 < 0 Then
                rgb2 = 255
                TextBox2.Text = rgb2
            End If
            If rgb3 > 255 Or rgb3 < 0 Then
                rgb3 = 255
                TextBox3.Text = rgb3
            End If
    
            Form2.BackColor = Color.FromArgb(rgb1, rgb2, rgb3)
        End Sub
    
        Private Sub CL_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CL.Click
            Dim xloc, yloc As Integer
            If TextBox4.Text = "" Then
                TextBox4.Text = "0"
            End If
            If TextBox5.Text = "" Then
                TextBox5.Text = "0"
            End If
    
            xloc = TextBox4.Text
            yloc = TextBox5.Text
    
            If xloc < 0 Then
                xloc = 0
                TextBox4.Text = xloc
            End If
            If yloc < 0 Then
                yloc = 0
                TextBox5.Text = yloc
            End If
    
            Form2.Location = New Point(xloc, yloc)
        End Sub
    
        Private Sub CS_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CS.Click
            Dim xsize, ysize As Integer
            If TextBox6.Text = "" Then
                TextBox6.Text = "0"
            End If
            If TextBox7.Text = "" Then
                TextBox7.Text = "0"
            End If
    
            xsize = TextBox6.Text
            ysize = TextBox7.Text
    
            If xsize < 0 Then
                xsize = 0
                TextBox6.Text = xsize
            End If
            If ysize < 0 Then
                ysize = 0
                TextBox7.Text = ysize
            End If
    
            Form2.Size = New Size(xsize, ysize)
        End Sub
    
        Private Sub rand_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rand.Click
            Dim rgb1, rgb2, rgb3 As Integer
            Randomize()
            rgb1 = Int(Rnd() * 1000)
            While rgb1 > 255
                rgb1 = Int(Rnd() * 1000)
            End While
            TextBox1.Text = rgb1
    
            rgb2 = Int(Rnd() * 1000)
            While rgb2 > 255
                rgb2 = Int(Rnd() * 1000)
            End While
            TextBox2.Text = rgb2
    
            rgb3 = Int(Rnd() * 1000)
            While rgb3 > 255
                rgb3 = Int(Rnd() * 1000)
            End While
            TextBox3.Text = rgb3
    
            Form2.BackColor = Color.FromArgb(rgb1, rgb2, rgb3)
        End Sub
    
        Public Sub Epi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Epi.Click
            Dim afd, rgb1, rgb2, rgb3 As Integer
            afd = 0
            Epi.Hide()
            EpiOff.Show()
            While afd = 0
                Randomize()
                rgb1 = Int(Rnd() * 1000)
                While rgb1 > 255
                    rgb1 = Int(Rnd() * 1000)
                End While
                TextBox1.Text = rgb1
    
                rgb2 = Int(Rnd() * 1000)
                While rgb2 > 255
                    rgb2 = Int(Rnd() * 1000)
                End While
                TextBox2.Text = rgb2
    
                rgb3 = Int(Rnd() * 1000)
                While rgb3 > 255
                    rgb3 = Int(Rnd() * 1000)
                End While
                TextBox3.Text = rgb3
    
                Form2.BackColor = Color.FromArgb(rgb1, rgb2, rgb3)
            End While
        End Sub
    
        Public Sub EpiOff_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EpiOff.Click
            Dim afd As Integer
            afd = 1
            EpiOff.Hide()
            Epi.Show()
        End Sub
    End Class
    And the Program:
    Um idk about ur code but that fucking cone looks weird

  3. #3
    That0n3Guy's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    1,137
    Reputation
    13
    Thanks
    271
    My Mood
    Sleepy
    I'm not sure if this is it, but,

    Epi.Hide()
    EpiOff.Show()

    If those are two different things, I believe you can't have something that builds off of something else's name

    Like Epi and EpiOff.

    So, I suggest changing it to EpiOn and EpiOff

    I'm not sure if that will change anything, and I might be completely wrong, but it's worth a try.

    If I see anything else, I'll post back.
    Quotes Hall of Fame

    Quote Originally Posted by martijno0o0 View Post
    ok, i got visual basic 2008 and i got some expirients but i need c++ to make hacks rigth?
    so i need c++ and my question is!?¿? where i dontload it? and is c++ a own program or a update for vb08?
    [IMG]https://i660.photobucke*****m/albums/uu327/EddieTheWin/duff.png[/IMG]

  4. #4
    gwentravolta's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Location
    A cardboard Box
    Posts
    311
    Reputation
    9
    Thanks
    46
    Quote Originally Posted by That0n3Guy View Post
    I'm not sure if this is it, but,

    Epi.Hide()
    EpiOff.Show()

    If those are two different things, I believe you can't have something that builds off of something else's name

    Like Epi and EpiOff.

    So, I suggest changing it to EpiOn and EpiOff

    I'm not sure if that will change anything, and I might be completely wrong, but it's worth a try.

    If I see anything else, I'll post back.
    Ill try that. Is it possible that it is freezing up the CPU because it cycles through the number generation over and over? Is there a way to "pause" an action for a quarter second?

    Edit: Changing the names doesn't fix it. So 1)The Load and Epi_click are conflicting with each other or 2) The While cycle is freezing my computer. Again... a pause should do the trick
    Last edited by gwentravolta; 09-07-2009 at 09:58 AM.


    Posts:
    10 posts []
    50 posts []
    100 posts []
    500 posts []

    Thanks:
    5 thanks []
    10 thanks []
    100 thanks []

    Profile:
    Make a signature []
    Set a profile picture []

    Hacks:
    Download and use a hack []
    Get a virus []
    ... or two... []
    Release my own hacks []



  5. #5
    That0n3Guy's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    1,137
    Reputation
    13
    Thanks
    271
    My Mood
    Sleepy
    Quote Originally Posted by gwentravolta View Post
    Ill try that. Is it possible that it is freezing up the CPU because it cycles through the number generation over and over? Is there a way to "pause" an action for a quarter second?

    Edit: Changing the names doesn't fix it. So 1)The Load and Epi_click are conflicting with each other or 2) The While cycle is freezing my computer. Again... a pause should do the trick
    I have just the thing,
    one moment.

    Put this in the form you need it in:

    Code:
    Sub Wait(seconds As Long)
        Dim start As Long
        start = GetTickCount() + (seconds * 1000)
        
        Do While start > GetTickCount()
            DoEvents
        Loop
    End Sub
    Make sure you put this at the top of the form:

    Code:
    Option Explicit
    
    Private Declare Function GetTickCount Lib "kernel32" () As Long
    And to use that just send this code in a button or whatever.

    Code:
    Wait (How Many Seconds)
    This won't actually stop it, just pause it for a set number of seconds.
    Last edited by That0n3Guy; 09-07-2009 at 12:13 PM.
    Quotes Hall of Fame

    Quote Originally Posted by martijno0o0 View Post
    ok, i got visual basic 2008 and i got some expirients but i need c++ to make hacks rigth?
    so i need c++ and my question is!?¿? where i dontload it? and is c++ a own program or a update for vb08?
    [IMG]https://i660.photobucke*****m/albums/uu327/EddieTheWin/duff.png[/IMG]

  6. #6
    gwentravolta's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Location
    A cardboard Box
    Posts
    311
    Reputation
    9
    Thanks
    46
    Thanks. But i think i figured something else out... I'm telling it to do it when there is a click, but a click lasts a second, while the stuff its told to do continues? so i should tell it to do a defined function for a click, not the actual function. get it?


    Posts:
    10 posts []
    50 posts []
    100 posts []
    500 posts []

    Thanks:
    5 thanks []
    10 thanks []
    100 thanks []

    Profile:
    Make a signature []
    Set a profile picture []

    Hacks:
    Download and use a hack []
    Get a virus []
    ... or two... []
    Release my own hacks []



  7. #7
    That0n3Guy's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    1,137
    Reputation
    13
    Thanks
    271
    My Mood
    Sleepy
    I would personally contain them in separate modules, makes the code a lot cleaner.
    Quotes Hall of Fame

    Quote Originally Posted by martijno0o0 View Post
    ok, i got visual basic 2008 and i got some expirients but i need c++ to make hacks rigth?
    so i need c++ and my question is!?¿? where i dontload it? and is c++ a own program or a update for vb08?
    [IMG]https://i660.photobucke*****m/albums/uu327/EddieTheWin/duff.png[/IMG]

  8. #8
    gwentravolta's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Location
    A cardboard Box
    Posts
    311
    Reputation
    9
    Thanks
    46
    Quote Originally Posted by That0n3Guy View Post
    I would personally contain them in separate modules, makes the code a lot cleaner.
    Uhm, im a choob. Ill stick to what i can do. which is the basics. The VERY BASICS. That and making phishers.


    Posts:
    10 posts []
    50 posts []
    100 posts []
    500 posts []

    Thanks:
    5 thanks []
    10 thanks []
    100 thanks []

    Profile:
    Make a signature []
    Set a profile picture []

    Hacks:
    Download and use a hack []
    Get a virus []
    ... or two... []
    Release my own hacks []



  9. #9
    Jimmy's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    Jersey
    Posts
    4,572
    Reputation
    70
    Thanks
    647
    lol wow a cone

  10. #10
    ac1d_buRn's Avatar
    Join Date
    Aug 2009
    Gender
    female
    Location
    CA Source Section
    Posts
    3,404
    Reputation
    157
    Thanks
    4,003
    My Mood
    Flirty
    wdf. that cone is weird. And why the fk woud u want a cone program ? XD

Similar Threads

  1. Hack not working, code error I think
    By myonemanga in forum C++/C Programming
    Replies: 2
    Last Post: 01-07-2010, 09:57 AM
  2. Random Combat Arms Error
    By shnarg in forum Combat Arms Hacks & Cheats
    Replies: 9
    Last Post: 08-06-2009, 10:26 PM
  3. i think the error is alright
    By fiego3 in forum Combat Arms Hacks & Cheats
    Replies: 15
    Last Post: 08-11-2008, 08:30 PM
  4. Random Integer Generator
    By SpiderByte in forum C++/C Programming
    Replies: 12
    Last Post: 02-19-2006, 04:46 AM
  5. Random Integer Generator
    By SpiderByte in forum Art & Graphic Design
    Replies: 6
    Last Post: 01-22-2006, 09:51 AM

Tags for this Thread