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 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:19 pm    Post subject: Anybody here know VB? Reply with quote

Simple stuff, I know, but I can't figure out the problem. :l
Back to top
View user's profile Send private message
Channel GannoK
pffrt
Reputation: 130

Joined: 12 Apr 2008
Posts: 608

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

I know a little. I could be of some help.
_________________
Back to top
View user's profile Send private message
Saucy.
How do I cheat?
Reputation: 42

Joined: 19 May 2010
Posts: 0

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

Well, my professor wants us to code a simple program, this is what I have..
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
   if surface > overSurfaceDetermine then overSurface = overSurfaceCharge else overSurface = overSurfaceNoCharge
   end if
   woodChoice = InputBox$("Enter your choice of wood; one for Pine, two for Oak, three for Mahogany: ")
   'get woodChoice
   if woodChoice = three then woodCost = mahogany
   end if
   if woodChoice = two then woodCost = oak
   end if
   if woodChoice = one then woodCost = pine
   end if
   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

When I try to run VBC, I get an error that states, "'end if' must be preceded by a matching if" when there is clearly one.
I feel like I'm making a stupid mistake, but I can't figure it out, and it's really bugging me. :<

Edit: started the class this week, so.. it's far from as simple as it can be, I know, only know the basics.
Back to top
View user's profile Send private message
SGL
Grandmaster Cheater
Reputation: 14

Joined: 04 May 2007
Posts: 758

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

VB is the language of gods.
_________________
I'm SirGodlike
Back to top
View user's profile Send private message
Channel GannoK
pffrt
Reputation: 130

Joined: 12 Apr 2008
Posts: 608

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

Hmm. Give me a minute. I don't have Visual basic on my computer, in the mean time, try different things and codes.
_________________
Back to top
View user's profile Send private message
Saucy.
How do I cheat?
Reputation: 42

Joined: 19 May 2010
Posts: 0

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

Image related.


Untitled.png
 Description:
 Filesize:  386.9 KB
 Viewed:  5036 Time(s)

Untitled.png


Back to top
View user's profile Send private message
Oblivious
Grandmaster Cheater Supreme
Reputation: 45

Joined: 12 Mar 2008
Posts: 1732

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

well it looks like one of your end ifs is missing an if
Back to top
View user's profile Send private message
Channel GannoK
pffrt
Reputation: 130

Joined: 12 Apr 2008
Posts: 608

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

Is there an error report?
_________________
Back to top
View user's profile Send private message
Saucy.
How do I cheat?
Reputation: 42

Joined: 19 May 2010
Posts: 0

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

Erblivious wrote:
well it looks like one of your end ifs is missing an if

It's saying all of them are.. :l
Back to top
View user's profile Send private message
Channel GannoK
pffrt
Reputation: 130

Joined: 12 Apr 2008
Posts: 608

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

"End if"s are supposed to go together I believe.
like so
Endif

_________________


Last edited by Channel GannoK on Thu Jan 27, 2011 11:38 pm; edited 1 time in total
Back to top
View user's profile Send private message
Oblivious
Grandmaster Cheater Supreme
Reputation: 45

Joined: 12 Mar 2008
Posts: 1732

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

Saucy Balmung wrote:
Erblivious wrote:
well it looks like one of your end ifs is missing an if

It's saying all of them are.. :l

Oh then look up how to use 'end if', you're probably using it wrong.
Back to top
View user's profile Send private message
Saucy.
How do I cheat?
Reputation: 42

Joined: 19 May 2010
Posts: 0

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

Erblivious wrote:
Saucy Balmung wrote:
Erblivious wrote:
well it looks like one of your end ifs is missing an if

It's saying all of them are.. :l

Oh then look up how to use 'end if', you're probably using it wrong.

According to the little he gives us, I'm using it right.

@Kyle, I guess I'll try that.



Untitled.png
 Description:
 Filesize:  420.13 KB
 Viewed:  5014 Time(s)

Untitled.png


Back to top
View user's profile Send private message
Oblivious
Grandmaster Cheater Supreme
Reputation: 45

Joined: 12 Mar 2008
Posts: 1732

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

Saucy Balmung wrote:
Erblivious wrote:
Saucy Balmung wrote:
Erblivious wrote:
well it looks like one of your end ifs is missing an if

It's saying all of them are.. :l

Oh then look up how to use 'end if', you're probably using it wrong.

According to the little he gives us, I'm using it right.

@Kyle, I guess I'll try that.

Try removing them all except the last one.
Back to top
View user's profile Send private message
Saucy.
How do I cheat?
Reputation: 42

Joined: 19 May 2010
Posts: 0

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

Erblivious wrote:
Saucy Balmung wrote:
Erblivious wrote:
Saucy Balmung wrote:
Erblivious wrote:
well it looks like one of your end ifs is missing an if

It's saying all of them are.. :l

Oh then look up how to use 'end if', you're probably using it wrong.

According to the little he gives us, I'm using it right.

@Kyle, I guess I'll try that.

Try removing them all except the last one.

Still get the same error, only it's saying that the one 'end if' I have is missing an 'if'.

edit: Shrooms, no dice, error related.



Untitled.png
 Description:
 Filesize:  497.66 KB
 Viewed:  4996 Time(s)

Untitled.png


Back to top
View user's profile Send private message
Oblivious
Grandmaster Cheater Supreme
Reputation: 45

Joined: 12 Mar 2008
Posts: 1732

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

Saucy Balmung wrote:
Erblivious wrote:
Saucy Balmung wrote:
Erblivious wrote:
Saucy Balmung wrote:
Erblivious wrote:
well it looks like one of your end ifs is missing an if

It's saying all of them are.. :l

Oh then look up how to use 'end if', you're probably using it wrong.

According to the little he gives us, I'm using it right.

@Kyle, I guess I'll try that.

Try removing them all except the last one.

Still get the same error, only it's saying that the one 'end if' I have is missing an 'if'.

edit: Shrooms, no dice, error related.

Remove them all, see if it gives you an error.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam All times are GMT - 6 Hours
Goto page 1, 2, 3  Next
Page 1 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