I am trying to make a adventure game via windows Command Console (old school).
I'm able to take basic Take, Look, etc commands but I lack the ability to do 'Args', like:
Take Flashlight
Look Up
etc.
What am I missing?
Current code:
poop was a test heh...
I'm able to take basic Take, Look, etc commands but I lack the ability to do 'Args', like:
Take Flashlight
Look Up
etc.
What am I missing?
Current code:
Module Main
'Public Cmds As New Commands
Public Prompt As String = "? "
Public Command As String
Sub Main()
Dim Args() As String
Dim A As Int16
If Args.Length = 0 Then
Console.WriteLine("No args!")
Console.ReadLine()
Else
Console.WriteLine(Prompt)
Command = Console.ReadLine()
Select Case Command
Case "Take"
If Args.Length = 0 Then
Console.WriteLine("Take what?")
Else
For A = 0 To Args.Length - 1
Select Case Args(A).ToString
Case "Poop"
Console.WriteLine("You a poop!")
Console.ReadLine()
Case "Flashlight"
Console.WriteLine("You took the flashlight!")
Console.ReadLine()
Case Else
Console.WriteLine("You took nothing, what the hell?")
Console.ReadLine()
End Select
Next
End If
Console.WriteLine(Prompt)
Console.ReadLine()
Case Else
Console.WriteLine("Invalid Command")
Command = Console.ReadLine()
End Select
End If
End Sub
End Module
poop was a test heh...