Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 8 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Star Trek Voyager: Elite Force
Category: Star Trek Voyager: Elite Force General
General game questions, comments and chat.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Anyone here familiar with VB.net?
CptCox~rb
General Member
Since: Dec 23, 2006
Posts: 3703
Last: Dec 23, 2006
[view latest posts]
Level 9
Category: Star Trek Voyager: Elite Force General
Posted: Thursday, Oct. 13, 2005 05:20 pm
Here's a rough way of how I'd do it, I'd write it into the code itself but I tend to go overboard and you'd probaly end up with a new UI and completely different code.
:p


'Onload
  Dim CurrentRound as Int32 = 0

'After each round
  CurrentRound=CurrentRound+1

'On button click, how to see what round you're on
  If CurrentRound=1 then
     Goto Round1
  ElseIf CurrentRound=2 then
     Goto Round2
  ElseIf CurrentRound=3 then
     Goto Round3
  Else
     'This fires if the the current round is not 1, 2 or 3
  End If
Share |
MMFSdjw~rb
General Member
Since: Dec 23, 2006
Posts: 3336
Last: Dec 23, 2006
[view latest posts]
Level 9
Category: Star Trek Voyager: Elite Force General
Posted: Thursday, Oct. 13, 2005 07:47 pm
well, the problem I'm having is changing the currentround from 1 to 2 and then to 3.
Is there a difference between
If CurrentRound=1 then
    Goto Round1

and
If CurrentRound=1 then
    Round1

?
if not, then that's what I've got.

I'm trying to use this function
Code Sample
  Function newround(ByRef roundnumber As Integer) As Integer
      If roundnumber = 1 Then
          roundnumber = 2
          'Return roundnumber
      Else
          If roundnumber = 2 Then
              roundnumber = 3
              'Return roundnumber
          Else
              If roundnumber = 3 Then
                  roundnumber = 1
                  'Return roundnumber
              End If
          End If
      End If
      Return roundnumber
  End Function

To change the round number.

it's being called in this section in the button click
Code Sample
      If roundnumber = 1 Then
          round1(pl1r1, pl2r1, roundnumber, player1score, player2score)
          newround(roundnumber)
      Else
          If roundnumber = 2 Then
              round2(pl1r2, pl2r2, roundnumber, player1score, player2score)
              newround(roundnumber)
          Else
              If roundnumber = 3 Then
                  round3(pl1r3, pl2r3, roundnumber, player1score, player2score)
                  newround(roundnumber)
              End If
          End If
      End If


But now after looking at it I see that the problem is in the button click where I put the value 1 into roundnumber.
Each time I click the button I reset the roundnumber to 1. so even if it is getting changed to the next number it's getting reset every time I click.

So what I need is a way to define the roundnumber as 1 outside of the button click.
As you can see above I already have "dim roundnumber as integer" outside of it
but I can't seem to place a value in it outside of the button click.
Share |
Agent007~rb
General Member
Since: Dec 23, 2006
Posts: 27798
Last: Dec 23, 2006
[view latest posts]
Level 10
Category: Star Trek Voyager: Elite Force General
Posted: Thursday, Oct. 13, 2005 08:04 pm
I get lost in my own old code...
Share |
Pumpkin~rb
General Member
Since: Dec 23, 2006
Posts: 1437
Last: Dec 23, 2006
[view latest posts]
Level 8
Category: Star Trek Voyager: Elite Force General
Posted: Thursday, Oct. 13, 2005 08:15 pm
I took VB.NET last semester...already forgot how to code in it.  :;):
Share |
Agent007~rb
General Member
Since: Dec 23, 2006
Posts: 27798
Last: Dec 23, 2006
[view latest posts]
Level 10
Category: Star Trek Voyager: Elite Force General
Posted: Thursday, Oct. 13, 2005 08:32 pm
I took it almost 2yrs ago... Then it was VB6...  Got a student version of VB .Net a few months back and started messing around... Made a few small XML reading/writing apps, but that's it.  I lose programming skills so quickly...  I made that MXC game in flash, and 2-3 months later I couldn't remember how to make a little animation for another project. :p
Share |
UniKorn~rb
General Member
Since: Dec 23, 2006
Posts: 1291
Last: Dec 23, 2006
[view latest posts]
Level 8
Category: Star Trek Voyager: Elite Force General
Posted: Thursday, Oct. 13, 2005 09:15 pm
I'll write you a response tomorrow, I'm not on my dev pc right now.
Share |
Lord Dave~rb
General Member
Since: Dec 23, 2006
Posts: 1843
Last: Dec 23, 2006
[view latest posts]
Level 8
Category: Star Trek Voyager: Elite Force General
Posted: Friday, Oct. 14, 2005 06:14 am
I am a master (well, almost) of Visual Basic.  VB.Net is an EVIL!!!!! program.  But what you want is very very simple.

First of all, your Interface is confusing.  I couldn't figure out what I'm supposed to do and it gave me an error when I hit the play button.

Anyway, define the variable in the General Declarations section then in the form load section make it equal to 1.  THEN when you finish a round say "round=round+1".  That'll increment it.

Also why do you have 3 separate subroutines for the different rounds when, logically, each round will play exactly the same as all the others.  The only difference is a variable or two and those can either be done with arrays or object arrays or something like that.
Share |
MMFSdjw~rb
General Member
Since: Dec 23, 2006
Posts: 3336
Last: Dec 23, 2006
[view latest posts]
Level 9
Category: Star Trek Voyager: Elite Force General
Posted: Friday, Oct. 14, 2005 02:01 pm
we haven't learned arrays yet. that's acctualy what she said we'd be doing for the next assignment
Share |
Lord Dave~rb
General Member
Since: Dec 23, 2006
Posts: 1843
Last: Dec 23, 2006
[view latest posts]
Level 8
Category: Star Trek Voyager: Elite Force General
Posted: Saturday, Oct. 15, 2005 05:36 pm
See that just makes your life so much harder.
Anyway, move that "round=1" thing to the forum_load section and you'll be able to increment the round number when you finish with the scoring.
Share |
MMFSdjw~rb
General Member
Since: Dec 23, 2006
Posts: 3336
Last: Dec 23, 2006
[view latest posts]
Level 9
Category: Star Trek Voyager: Elite Force General
Posted: Saturday, Oct. 15, 2005 06:04 pm
well, I ended up just cutting out the round changes.
I think i've already strayed enough from the way she asked us to do the assignment that it won't make a big difference.

Thanks for you help.
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Star Trek Voyager: Elite Force : Star Trek Voyager: Elite Force General

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»