noob requiring expertice
noob requiring expertice
noob requiring expertice
noob requiring expertice
noob requiring expertice
noob requiring expertice noob requiring expertice noob requiring expertice noob requiring expertice noob requiring expertice noob requiring expertice noob requiring expertice noob requiring expertice
noob requiring expertice noob requiring expertice
noob requiring expertice
Go Back  Xtreme Visual Basic Talk > > > noob requiring expertice


Reply
 
Thread Tools Display Modes
  #1  
Old 07-22-2005, 09:35 AM
Price839 Price839 is offline
Newcomer
 
Join Date: Jul 2005
Posts: 2
Default noob requiring expertice


alright i am currently working on an rpg and i am having troubles getting the newgame procedure to work, its probably something small and obvious to you guys but i have hit a road block i cant get around alone and would happily accept anybodys ten cents on what i did/am doing wrong

Private Sub NewGame_Click()
Call NewGame
End Sub

Private Sub QuitButton_Click()
End
End Sub


Public Sub NewGame()
Options.Hide ' remove the options form from the screen
Form1.Show ' show the blank form

' for test purposes, creat 20 random and print their statistics
For X% = 1 To 20
I% = 0
Call CreateItem(I%)
Form1.Print Item(CurObjNo%).Name, Item(CurObjNo%).Type, Item(CurObjNo%).Worth
Next X%

End Sub


when i go to run it it informs me that the public sub new game already exsits in an object module from which the object module derives...i thought maybe i had named the procedure wrong so i made it a function and than an event but i still cant get it to work...
Reply With Quote
  #2  
Old 07-22-2005, 09:40 AM
passel's Avatar
passelnoob requiring expertice passel is offline
Sinecure Expert

Super Moderator
* Guru *
 
Join Date: Jun 2003
Location: Upstate New York, usa
Posts: 8,024
Default

You can't have two objects by the same name, in the same scope.
You have a button named NewGame.
You have a Sub named NewGame.

Perhaps change the button's name to cmdNewGame.
__________________
There Is An Island Of Opportunity In The Middle of Every Difficulty.
Miss That, Though, And You're Pretty Much Doomed.
Reply With Quote
  #3  
Old 07-22-2005, 10:06 AM
Price839 Price839 is offline
Newcomer
 
Join Date: Jul 2005
Posts: 2
Default

Quote:
Originally Posted by passel
You can't have two objects by the same name, in the same scope.
You have a button named NewGame.
You have a Sub named NewGame.

Perhaps change the button's name to cmdNewGame.



wow i feel retarded thanks
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
noob requiring expertice
noob requiring expertice
noob requiring expertice noob requiring expertice
noob requiring expertice
noob requiring expertice
noob requiring expertice noob requiring expertice noob requiring expertice noob requiring expertice noob requiring expertice noob requiring expertice noob requiring expertice
noob requiring expertice
noob requiring expertice
 
noob requiring expertice
noob requiring expertice
 
-->