Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Anybody here know VB?
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam
View previous topic :: View next topic  
Author Message
Saucy.
How do I cheat?
Reputation: 42

Joined: 19 May 2010
Posts: 0

PostPosted: Thu Jan 27, 2011 11:59 pm    Post subject: Reply with quote

Shrooms wrote:
Code:
Module Furniture
    Sub Main()
        Dim minimum As Double = 150.0
        Dim length As Double
        Dim width As Double
        Dim surface As Double
        Dim overSurface As Double
        Dim overSurfaceDetermine As Double = 750.0
        Dim overSurfaceCharge As Double = 50.0
        Dim overSurfaceNoCharge As Double = 0.0
        Dim woodChoice As String
        Dim mahogany As Double = 200.0
        Dim oak As Double = 100.0
        Dim pine As Double = 0.0
        Dim leaf As Integer
        Dim leafcost As Double = 50.0
        Dim three As String
        three = ""
        Dim two As String
        two = ""
        Dim one As String
        one = ""
        Dim woodCost As Double
        Dim endTotal As Double
        Dim leafTotal As Double
        length = InputBox$("Enter length: ")
        'get length
        width = InputBox$("Enter width: ")
        'get width
        surface = width * length
        If (surface > overSurfaceDetermine) Then overSurface = overSurfaceCharge Else overSurface = overSurfaceNoCharge
        woodChoice = InputBox$("Enter your choice of wood; one for Pine, two for Oak, three for Mahogany: ")
        'get woodChoice
        If (woodChoice = three) Then woodCost = mahogany Else If (woodChoice = two) Then woodCost = oak Else If (woodChoice = one) Then woodCost = pine
        leaf = InputBox$("Number of leaves: ")
        'get leaf
        leafTotal = leaf * leafcost
        endTotal = leafTotal + woodCost + overSurface
        System.Console.WriteLine("The charge for this table is $" & endTotal)
    End Sub
End Module


Still doing without a vb vs LOL. All in head.

I use nothing but Notepad++ and the little help my professor gives online.
Also, it worked, fucking love you.
Back to top
View user's profile Send private message
Saucy.
How do I cheat?
Reputation: 42

Joined: 19 May 2010
Posts: 0

PostPosted: Fri Jan 28, 2011 12:28 am    Post subject: Reply with quote

Shrooms wrote:
Saucy Balmung wrote:
Shrooms wrote:
Code:
Module Furniture
    Sub Main()
        Dim minimum As Double = 150.0
        Dim length As Double
        Dim width As Double
        Dim surface As Double
        Dim overSurface As Double
        Dim overSurfaceDetermine As Double = 750.0
        Dim overSurfaceCharge As Double = 50.0
        Dim overSurfaceNoCharge As Double = 0.0
        Dim woodChoice As String
        Dim mahogany As Double = 200.0
        Dim oak As Double = 100.0
        Dim pine As Double = 0.0
        Dim leaf As Integer
        Dim leafcost As Double = 50.0
        Dim three As String
        three = ""
        Dim two As String
        two = ""
        Dim one As String
        one = ""
        Dim woodCost As Double
        Dim endTotal As Double
        Dim leafTotal As Double
        length = InputBox$("Enter length: ")
        'get length
        width = InputBox$("Enter width: ")
        'get width
        surface = width * length
        If (surface > overSurfaceDetermine) Then overSurface = overSurfaceCharge Else overSurface = overSurfaceNoCharge
        woodChoice = InputBox$("Enter your choice of wood; one for Pine, two for Oak, three for Mahogany: ")
        'get woodChoice
        If (woodChoice = three) Then woodCost = mahogany Else If (woodChoice = two) Then woodCost = oak Else If (woodChoice = one) Then woodCost = pine
        leaf = InputBox$("Number of leaves: ")
        'get leaf
        leafTotal = leaf * leafcost
        endTotal = leafTotal + woodCost + overSurface
        System.Console.WriteLine("The charge for this table is $" & endTotal)
    End Sub
End Module


Still doing without a vb vs LOL. All in head.

I use nothing but Notepad++ and the little help my professor gives online.
Also, it worked, fucking love you.


This is why I got really good in my recent java course.

And to everyone else, surprised you said "delete end ifs"..... :roll:

JAVA SYNTEX = VB SYNTEX with a few differences.

Turns out there's a problem with that.
It always reads the woodCost as Pine, regardless of what the user enters. :l
Back to top
View user's profile Send private message
Mychilli
Grandmaster Cheater Supreme
Reputation: 3

Joined: 19 Jun 2006
Posts: 1141

PostPosted: Fri Jan 28, 2011 12:36 am    Post subject: Reply with quote

Select Case is what you want
http://msdn.microsoft.com/en-us/library/cy37t14y(v=vs.80).aspx
Back to top
View user's profile Send private message
Saucy.
How do I cheat?
Reputation: 42

Joined: 19 May 2010
Posts: 0

PostPosted: Fri Jan 28, 2011 12:44 am    Post subject: Reply with quote

No luck, thanks guys, just turning what I have, I've spent far too much on this, I'll still get some points.. three more labs to go, and four long codes to debug before Noon.. and I'll need some sleep too.
Thanks again for trying to help.
Back to top
View user's profile Send private message
Mychilli
Grandmaster Cheater Supreme
Reputation: 3

Joined: 19 Jun 2006
Posts: 1141

PostPosted: Fri Jan 28, 2011 12:46 am    Post subject: Reply with quote

i just told u how to do it B|
Back to top
View user's profile Send private message
gogodr
I post too much
Reputation: 125

Joined: 19 Dec 2006
Posts: 2041

PostPosted: Fri Jan 28, 2011 1:03 am    Post subject: Reply with quote

did you try adding new lines and closing your IF conditions in ()'s ?

edit:: too late I guess xP
Back to top
View user's profile Send private message MSN Messenger
Saucy.
How do I cheat?
Reputation: 42

Joined: 19 May 2010
Posts: 0

PostPosted: Fri Jan 28, 2011 1:13 am    Post subject: Reply with quote

Haven't sent yet, if you think you can help, Gogo.
Shrooms, it still doesn't work, you were colder that time. ;-;
Back to top
View user's profile Send private message
gogodr
I post too much
Reputation: 125

Joined: 19 Dec 2006
Posts: 2041

PostPosted: Fri Jan 28, 2011 1:30 am    Post subject: Reply with quote

try this?

Code:
Module Furniture
   Sub Main()
      dim minimum as double = 150.00
      dim length as double
      dim width as double
      dim surface as double
      dim overSurface as double
      dim overSurfaceDetermine as double = 750.00
      dim overSurfaceCharge as double = 50.00
      dim overSurfaceNoCharge as double = 0.00
      dim woodChoice as string
      dim mahogany as double = 200.00
      dim oak as double = 100.00
      dim pine as double = 0.00
      dim leaf as integer
      dim leafcost as double = 50.00
      dim three as string
      dim two as string
      dim one as string
      dim woodCost as double
      dim endTotal as double
      dim leafTotal as double
    
   length = InputBox$("Enter length: ")
   'get length
   width = InputBox$("Enter width: ")
   'get width
   surface = width * length
   
   woodChoice = InputBox$("Enter your choice of wood; one for Pine, two for Oak, three for Mahogany: ")
   'get woodChoice
   
   leaf = InputBox$("Number of leaves: ")
   'get leaf
   
   
   if (surface > overSurfaceDetermine) then
   overSurface = overSurfaceCharge
   else overSurface = overSurfaceNoCharge
   end if
   
   if (woodChoice = three) then
   woodCost = mahogany
     
   elseif (woodChoice = two) then
   woodCost = oak
   
   elseif (woodChoice = one) then
   woodCost = pine
   end if
   
   
   leafTotal = leaf * leafCost
   endTotal = leafTotal + woodCost + overSurface
   System.Console.WriteLine("The charge for this table is $" & endTotal)
   End Sub
End Module
Back to top
View user's profile Send private message MSN Messenger
Saucy.
How do I cheat?
Reputation: 42

Joined: 19 May 2010
Posts: 0

PostPosted: Fri Jan 28, 2011 1:38 am    Post subject: Reply with quote

Disregard this, all of you who tried to help, I owe you a bunch.
Back to top
View user's profile Send private message
gogodr
I post too much
Reputation: 125

Joined: 19 Dec 2006
Posts: 2041

PostPosted: Fri Jan 28, 2011 11:13 am    Post subject: Reply with quote

Shrooms wrote:
gogodr wrote:
try this?

Code:
Module Furniture
   Sub Main()
      dim minimum as double = 150.00
      dim length as double
      dim width as double
      dim surface as double
      dim overSurface as double
      dim overSurfaceDetermine as double = 750.00
      dim overSurfaceCharge as double = 50.00
      dim overSurfaceNoCharge as double = 0.00
      dim woodChoice as string
      dim mahogany as double = 200.00
      dim oak as double = 100.00
      dim pine as double = 0.00
      dim leaf as integer
      dim leafcost as double = 50.00
      dim three as string
      dim two as string
      dim one as string
      dim woodCost as double
      dim endTotal as double
      dim leafTotal as double
    
   length = InputBox$("Enter length: ")
   'get length
   width = InputBox$("Enter width: ")
   'get width
   surface = width * length
   
   woodChoice = InputBox$("Enter your choice of wood; one for Pine, two for Oak, three for Mahogany: ")
   'get woodChoice
   
   leaf = InputBox$("Number of leaves: ")
   'get leaf
   
   
   if (surface > overSurfaceDetermine) then
   overSurface = overSurfaceCharge
   else overSurface = overSurfaceNoCharge
   end if
   
   if (woodChoice = three) then
   woodCost = mahogany
     
   elseif (woodChoice = two) then
   woodCost = oak
   
   elseif (woodChoice = one) then
   woodCost = pine
   end if
   
   
   leafTotal = leaf * leafCost
   endTotal = leafTotal + woodCost + overSurface
   System.Console.WriteLine("The charge for this table is $" & endTotal)
   End Sub
End Module


Yours won't work... Laughing

nor does yours
"Shrooms, it still doesn't work, you were colder that time. ;-;"


_________

BTW: mine does work. I just tested it in Excel.

Code:
Sub main()


      Dim minimum As Double
      Dim length As Double
      Dim width As Double
      Dim surface As Double
      Dim overSurface As Double
      Dim overSurfaceDetermine As Double
      Dim overSurfaceCharge As Double
      Dim overSurfaceNoCharge As Double
      Dim woodChoice As String
      Dim mahogany As Double
      Dim oak As Double
      Dim pine As Double
      Dim leaf As Integer
      Dim leafcost As Double
      Dim three As String
      Dim two As String
      Dim one As String
      Dim woodCost As Double
      Dim endTotal As Double
      Dim leafTotal As Double
     
      minimum = 150
      overSurface = 750
      overSurfaceCharge = 50
      overSurfaceNoCharge = 0
      mahogany = 200
      oak = 100
      pine = 0
      leaftcost = 50
     
     
   length = InputBox$("Enter length: ")
   'get length
   width = InputBox$("Enter width: ")
   'get width
   surface = width * length
   
   woodChoice = InputBox$("Enter your choice of wood; one for Pine, two for Oak, three for Mahogany: ")
   'get woodChoice
   
   leaf = InputBox$("Number of leaves: ")
   'get leaf
   
   
   If (surface > overSurfaceDetermine) Then
   overSurface = overSurfaceCharge
   Else: overSurface = overSurfaceNoCharge
   End If
   
   If (woodChoice = three) Then
   woodCost = mahogany
     
   ElseIf (woodChoice = two) Then
   woodCost = oak
   
   ElseIf (woodChoice = one) Then
   woodCost = pine
   End If
   
   
   leafTotal = leaf * leafcost
   endTotal = leafTotal + woodCost + overSurface
   Sheet4.Cells(1, 1) = "The charge for this table is $" & endTotal
   'System.Console.WriteLine ("The charge for this table is $" & endTotal)
   End Sub
Back to top
View user's profile Send private message MSN Messenger
Jesper
Grandmaster Cheater Supreme
Reputation: 9

Joined: 21 Feb 2007
Posts: 1156

PostPosted: Fri Jan 28, 2011 11:35 am    Post subject: Reply with quote

You forgot the trailing Then after the if statements.
Back to top
View user's profile Send private message
gogodr
I post too much
Reputation: 125

Joined: 19 Dec 2006
Posts: 2041

PostPosted: Fri Jan 28, 2011 12:30 pm    Post subject: Reply with quote

you need the last else otherwise if someone inputs "bullshit" it would still mean pine :/

and mine works perfectly too :3
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam All times are GMT - 6 Hours
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites