Hi there annoying Pita again... had a little help getting some code written but i've got a few error messages i cannot get rid of, below i've indluded the code and errors i am getting. Sorry but they are text files as i ran out of space to simply copy and paste.
Can anyone fix the errors up and/or tell me how they did or would do it.
thank you for helping.. definately solved a lot of headaches, sorry if i'm creating a lot of hassle... bout the only thing i'm good at.. <G>. Went down to jut threee errors though went i added addquest.vb went up to 11 again...
I have two suggestion to make, which will be helpful to you in the future.
One is, use proper naming conventions for your objects so that another person reading it knows what you're doing.
I just had a harrowing time figuring out what exactly you were doing, and what exactly a "dark blizzard" is
Second, comments help tremenduously. It may seem trivial at first, but as your coding progresses and your app grows larger, you'll have a harder time knowing what you just did and where.
With that said, here's the code to be used in AddQuestform.vb:
VB Code:
Imports System.Xml
Imports System.io
Public Class AddQuestform
Inherits System.Windows.Forms.Form
Friend Label2 As System.Windows.Forms.Label
Friend Label1 As System.Windows.Forms.Label
Friend TextBox1 As System.Windows.Forms.TextBox
Friend TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend ComboBox1 As System.Windows.Forms.ComboBox
Friend Label3 As System.Windows.Forms.Label
Dim mainform As WindowsApplication1.DefaultNamespace.MainForm
#Region " Windows Form Designer generated code "
Public Sub New(ByRef mainform As Form)
MyBase.New()
mainform = mainform
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.Label3 = New System.Windows.Forms.Label
Me.ComboBox1 = New System.Windows.Forms.ComboBox
Me.Button1 = New System.Windows.Forms.Button
Me.TextBox2 = New System.Windows.Forms.TextBox
Me.TextBox1 = New System.Windows.Forms.TextBox
Me.Label1 = New System.Windows.Forms.Label
Me.Label2 = New System.Windows.Forms.Label
Me.SuspendLayout()
'
'Label3
'
Me.Label3.Location = New System.Drawing.Point(56, 64)
First of thanks for all the help mendhak its really appreciated. i've copied the code to the vb file and i'm still getting a hole host of errors... do you think we could talk over msn or aim or soemthing perhaps you could talke me through and sort the problems quicker that way, i could explain excactly what its ment to do and hopefully get it fixed?
Sorry, I am not open to talking over any messenger, because I am too poor to afford one.
You can post your errors and problems here.
One thing I did notice in your solution when I opened it up, was that Form1.VB was showing an error there. Apparently, you must have renamed or removed it improperly. I deleted Form1.vb from the solution explorer.
C:\Documents and Settings\Scott\My Documents\SharpDevelop Projects\questerer\AddQuestform.vb(15) : error BC30002: Type 'WindowsApplication1.DefaultNamespace.MainForm' is not defined.
Dim mainform As WindowsApplication1.DefaultNamespace.MainForm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Documents and Settings\Scott\My Documents\SharpDevelop Projects\questerer\AddQuestform.vb(22) : error BC30002: Type 'Form' is not defined.
Public Sub New(ByRef mainform As Form)
~~~~
C:\Documents and Settings\Scott\My Documents\SharpDevelop Projects\questerer\AddQuestform.vb(142) : error BC30002: Type 'Exception' is not defined.
Catch ex As Exception
~~~~~~~~~
C:\Documents and Settings\Scott\My Documents\SharpDevelop Projects\questerer\AddQuestform.vb(145) : error BC30002: Type 'Exception' is not defined.
Catch ex2 As Exception
~~~~~~~~~
C:\Documents and Settings\Scott\My Documents\SharpDevelop Projects\questerer\AddQuestform.vb(146) : error BC30451: Name 'MessageBox' is not declared.
MessageBox.Show("cannot save file")
~~~~~~~~~~
C:\Documents and Settings\Scott\My Documents\SharpDevelop Projects\questerer\AddQuestform.vb(171) : error BC30451: Name 'vbCrLf' is not declared.
For Each line As String In TextBox1.Text.Split(vbCrLf)
~~~~~~
C:\Documents and Settings\Scott\My Documents\SharpDevelop Projects\questerer\AddQuestform.vb(185) : error BC30451: Name 'MessageBox' is not declared.
MessageBox.Show("Quest: " & TextBox2.Text & " is saved!")
~~~~~~~~~~
C:\Documents and Settings\Scott\My Documents\SharpDevelop Projects\questerer\QuestStorage.vb(3) : error BC30002: Type 'ArrayList' is not defined.
Private commandList As New ArrayList
~~~~~~~~~
C:\Documents and Settings\Scott\My Documents\SharpDevelop Projects\questerer\QuestStorage.vb(14) : error BC30002: Type 'ArrayList' is not defined.
Public Function getCommands() As ArrayList
~~~~~~~~~
just occured to me to let ya know ha's going on there might be a better way of doing things!
I'm trying to create a program that will have various buttons for different locations within a game a play, these buttons should trigger of a pattern of commands being sent to that game to do whatever it is thats needed to be done, move the character north picking up items etc.
preferably these commands would be stored in atext file or somesuch that is easily editable, so i can change whats going on wtihout having to rewrite another program.
the program would also have to send a 1 second pause after each line from the text file is sent
as an example:
Line 1 :<whatever the commands are>
wait one second
Line 2 :<whatever the commands are>
etc.
etc.
hope that helps with either getting what i;ve got so far to work correctly or getting soemthing that will!
C:\Documents and Settings\Scott\My Documents\SharpDevelop Projects\questerer\AddQuestform.vb(19) : error BC30002: Type 'WindowsApplication1.DefaultNamespace.MainForm' is not defined.
Dim mainform As WindowsApplication1.DefaultNamespace.MainForm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Documents and Settings\Scott\My Documents\SharpDevelop Projects\questerer\AddQuestform.vb(26) : error BC30002: Type 'Form' is not defined.
Public Sub New(ByRef mainform As Form)
~~~~
C:\Documents and Settings\Scott\My Documents\SharpDevelop Projects\questerer\AddQuestform.vb(150) : error BC30451: Name 'MessageBox' is not declared.
MessageBox.Show("cannot save file")
~~~~~~~~~~
C:\Documents and Settings\Scott\My Documents\SharpDevelop Projects\questerer\AddQuestform.vb(189) : error BC30451: Name 'MessageBox' is not declared.
MessageBox.Show("Quest: " & TextBox2.Text & " is saved!")
~~~~~~~~~~
C:\Documents and Settings\Scott\My Documents\SharpDevelop Projects\questerer\QuestStorage.vb(3) : error BC30002: Type 'ArrayList' is not defined.
Private commandList As New ArrayList
~~~~~~~~~
C:\Documents and Settings\Scott\My Documents\SharpDevelop Projects\questerer\QuestStorage.vb(14) : error BC30002: Type 'ArrayList' is not defined.
Public Function getCommands() As ArrayList
~~~~~~~~~
C:\Documents and Settings\Scott\My Documents\SharpDevelop Projects\questerer\AddQuestform.vb(21) : error BC30002: Type 'WindowsApplication1.DefaultNamespace.MainForm' is not defined.
Dim mainform As WindowsApplication1.DefaultNamespace.MainForm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Documents and Settings\Scott\My Documents\SharpDevelop Projects\questerer\QuestStorage.vb(3) : error BC30002: Type 'ArrayList' is not defined.
Private commandList As New ArrayList
~~~~~~~~~
C:\Documents and Settings\Scott\My Documents\SharpDevelop Projects\questerer\QuestStorage.vb(14) : error BC30002: Type 'ArrayList' is not defined.
Public Function getCommands() As ArrayList
~~~~~~~~~
Dude... your IDE is seriously messed up. Your application is running perfectly fine on my machine (except the XML part) and don't even have the Imports statements in there.
heh well that's sharpdevelop for you... guess it doesn't do quite as much as say visual studio... I'll have to get that as soon as i can afford it... well thanks for your help ths far anyhow... guess it just wasn;t ment to be!
Originally posted by Bobba heh well that's sharpdevelop for you... guess it doesn't do quite as much as say visual studio... I'll have to get that as soon as i can afford it... well thanks for your help ths far anyhow... guess it just wasn;t ment to be!
I had no idea what sharpdevelop was!
No wonder... ok, hold on, let me check a few more things.
sharpdevelop is the program i'm using to write this stuff... i'll try nd find a link for it.. http://www.icsharpcode.net/OpenSource/SD/ wel thats the hompage... might help niot sure
just thought if it works on your's couldn;t you coompile it then all i'd have to do is alter the xml files... that is where the data would be stored right?
C:\Documents and Settings\Scott\My Documents\SharpDevelop Projects\questerer\AddQuestform.vb(26) : error BC30002: Type 'WindowsApplication1.DefaultNamespace.MainForm' is not defined.
Dim mainform As WindowsApplication1.DefaultNamespace.MainForm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Documents and Settings\Scott\My Documents\SharpDevelop Projects\questerer\AddQuestform.vb(10) : error BC30466: Namespace or type 'DefaultNamespace' for the Imports 'WindowsApplication1.DefaultNamespace' cannot be found.
Imports WindowsApplication1.DefaultNamespace
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Documents and Settings\Scott\My Documents\SharpDevelop Projects\questerer\AddQuestform.vb(27) : error BC30002: Type 'mainform' is not defined.
still two errors C:\Documents and Settings\Scott\My Documents\SharpDevelop Projects\questerer\AddQuestform.vb(10) : error BC30466: Namespace or type 'DefaultNamespace' for the Imports 'WindowsApplication1.DefaultNamespace' cannot be found.
Imports WindowsApplication1.DefaultNamespace
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Documents and Settings\Scott\My Documents\SharpDevelop Projects\questerer\AddQuestform.vb(27) : error BC30002: Type 'mainform' is not defined.