Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

 

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

My VB.NET Game Programming Tutorial Site (GDI+, Direct3D, Tetris [coming soon], a full RPG.... you name it!)

vbprogramming.8k.com

My Project (Need VB.NET Programmers)

http://workspaces.gotdotnet.com/ResolutionRPG

  • Leaders
Posted

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. :)

Iceplug, USN

One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(

Posted

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

My VB.NET Game Programming Tutorial Site (GDI+, Direct3D, Tetris [coming soon], a full RPG.... you name it!)

vbprogramming.8k.com

My Project (Need VB.NET Programmers)

http://workspaces.gotdotnet.com/ResolutionRPG

  • Leaders
Posted
We had a problem at one time where the VB tags messed up if you used the WYSIWYG Editor. You wouldn't happen to be using that, would you?

Iceplug, USN

One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(

Posted
But, could we get a coloured syntax C# code tag? It would be appreciated :)

For questions about VS .net extensibility, please fire at me! :)

For readability, please use the [ CS][/CS ] tags

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...