Messed up VB tags on THIS forum (not on XVBT)

ThePentiumGuy

Senior Contributor
Joined
May 21, 2003
Messages
1,113
Location
Boston, Massachusetts
There's a VB tag problem on this forum which is not present on the XVBT forum. If you want some examples I can show you plenty :). One reason being that if there is one comment in the source code, it thinks the rest is a comment.

Visual Basic:
line = reader.readline
If Not line.contains(":") Then
 'Read it like normal
 'This is easy
Else 
 s =line.split(":")
 if s(0) = "Choice" then LookAtChoice(line) End If 
End If
Public Sub LookAtChoice(line as string)
 Dim colonSplit() as string
 Dim commaSplit() as String
 Dim numberofchoices as integer
colonsplit = line.Split(":")  'Split "Choice:Yes,No:Would you like some money?"
texttodisplay = colonsplit(2) ' "Would you like some money"
commasplit = colonsplit(1).Split(",")
 numberofchoices = commasplit(0)
' I'll create a DisplayChoiceList function somewhere else. 
' The game will only be able to hold 2, 3, or 4 choices
if numberofchoices = 2 then DisplayChoiceList(numchoices, commasplit(1), commasplit(2))
if numberofchoices = 3 then DisplayChoiceList(numchoices, commasplit(1), commasplit(2), commasplit(3))
if numberofchoices = 4 then DisplayChoiceList(numchoices, commasplit(1), commasplit(2), commasplit(3), commasplit(4))
UpdateTextToDisplay()
End Sub
'Later, when the player chooses a choice:
Public sub CheckForChoices(myChoice as String)
  Reader.readline() 'The #Choice line is just for cleansiness
  Dim numLines as string
  loop until reader.readline = myChoice & ":"  'The line looks like " Yes: "
    numlines = cint(reader.readline) ' the 2 in the line after Yes: .. or No:
    for x as integer = 1 to numlines
     texttodisplay = reader.read
     UpdateTextToDisplay()
    next
    Loop until reader.readline = "#EndChoice" 
     'Skip the rest of the choices
    Wend 
  Wend
End Sub

The VB code tags are MUCH cleaner on the other forum:
http://www.xtremevbtalk.com/showpost.php?p=922655&postcount=1

I realize that you don't have access to the source code from iNET. However, I thought the 2 forums were based off the same source code. So why is this even a problem? And I know it's not your fault :).

-The Pentium Guy
 
FYI, The VB tags on XVBT are VB6 tags, not VB.NET Tags, and were written before iNET.
These are supposed to be VB.NET tags, but looks like their implementation isn't too good. :)
 
WOW. It took me forever to find this quickreply box (I had to scroll right quite a lot before I found it).

I guess you could say that the vb6 tags work better than the vb.NET tags. HOWEVER, taking a look at this post(http://www.xtremedotnettalk.com/showpost.php?p=434566&postcount=8), on this forum seems to convince me otherwise. They're screwed up sometimes but other times... they work perfectly fine! What the hell lol.

-The Pentium Guy
 
Back
Top