Type Mismatch

Minalth
03-08-2004, 09:57 AM
OK, i probably dont need to give you all of this, but i dont know what the problem is and it could be coming from anywhere as far as i know

When I try to ReDim ShipArray I get a msgbox saying

compile error:
Invalid Redim

and the line I have <----------- at is highlighted yellow





Declare Function BitBlt Lib "gdi32" _
(ByVal hDestDC As Long, _
ByVal x As Long, _
ByVal y As Long, _
ByVal nWidth As Long, _
ByVal nHeight As Long, _
ByVal hSrcDC As Long, _
ByVal xSrc As Long, _
ByVal ySrc As Long, _
ByVal dwRop As Long) As Long


Dim x As Integer

Public Type ShipArray ' define the contents of the ships Array
Name As String ' ship's name
Icon As Integer ' icon (graphic) number of the ship
x As Integer ' current X coordinate on map
y As Integer ' current Y coordinate on map
Type As Integer ' what kind of ship is it
HitPtMax As Integer ' ships maximum hit points
HitPtCur As Integer ' ships current hit points
Alive As Integer '1 = there 0 = not there
End Type
Global Ship(10) As ShipArray ' create space for 10 ships

Dim ShipMax, ShipMin, TotShips As Integer


Sub MainLoop()

End Sub


Sub CreateShip(ByVal ShipType As Integer)
'this routine creates a new Ship and adds it to the array
' item's:
' Calling Arguments
' ShipType=0 create a random Ship
' ShipType=# create that Ship
' returning arguments
' none, CurShipNo% hold current Ship number
' expected variables
ShipMax = UBound(Ship)
ShipMin = LBound(Ship)
TotShips = (ShipMax - ShipMin)

If ShipType = 0 Then ' random object desired, pick the object
CurShipType% = Int(Rnd * 5) + 1
End If
If CurShipType% < 1 Or CurShipType% > 5 Then ' check for invalid Ship no
MsgBox "CreateShip discovered invalid CurShipType% of" + Str(CurShipType%)
End
End If

' now find an empty spot in the Ship array or append to the end
CurShipNo% = 0
For x% = 1 To TotShips
If Ship(x%).Alive = 0 Then CurShipNo% = x%
Next x%
If CurShipNo% = 0 Then
ReDim Preserve ShipArray((UBound(ShipArray) + 1)) <----------------------------------------------------------------
CurShipNo% = UBound(ShipArray)
End If
' this set of code is the same for all Ships
Ship(CurShipNo%).Icon = CurShipNo% 'use the Ship number as its icon
Ship(CurShipNo%).x = 0
Ship(CurShipNo%).y = 0 '''''''''''''''''''''''''MAKE THIS RANDOM------ (this is a note to self, ignore it)
Ship(CurShipNo%).Type = CurShipType%

Select Case CurShipType% ' select a section of code based on the value of CurShipType%
Case 1
Ship(CurShipNo%).Name = "Type1"
Ship(CurShipNo%).Alive = 1
Ship(CurShipNo%).HitPtMax = 1
Case 2
Ship(CurShipNo%).Name = "Type2"
Ship(CurShipNo%).Alive = 1
Ship(CurShipNo%).HitPtMax = 3 + Rnd * 3
Case 3
Ship(CurShipNo%).Name = "Type3"
Ship(CurShipNo%).Alive = 1
Ship(CurShipNo%).HitPtMax = 5 + Rnd * 5
Case 4
Ship(CurShipNo%).Name = "Type4"
Ship(CurShipNo%).Alive = 1
Ship(CurShipNo%).HitPtMax = 10 + Rnd * 5
Case 5
Ship(CurShipNo%).Name = "Type5"
Ship(CurShipNo%).Alive = 1
Ship(CurShipNo%).HitPtMax = 15 + Rnd * 10
Case Else ' something is wrong because an invalid CurShip% was used
MsgBox "CreateShip discovered invalid CurShipType% of" + Str(CurShipType%)
End
End Select

' Set "Current" levels equal to "Max" levels
Ship(CurShipNo%).HitPtCur = Ship(CurShipNo%).HitPtMax


End Sub


I also tried 'ReDim Preserve Ship((UBound(ShipArray) + 1))' which gives me:
'compile error:
array already dimensioned'

I am calling on the create ship thing from a form, this is in a module

What am I doing wrong?

Thanks in advance!
Minalth

EDIT: I forgot to apologise for being a newb and asking a stupid Q which is probably in the wrong section of the forum (I tried!) and with more wrong things about it as well that i dont know about yet lol

GavinO
03-08-2004, 10:03 AM
You want to first not include a size in the declaration of Ship:

Dim Ship() As ShipArray

Secondly, you want to be referencing Ship, not the type ShipArray, in the ReDim:

ReDim Preserve Ship(blah)

Minalth
03-08-2004, 10:15 AM
You want to first not include a size in the declaration of Ship:

Dim Ship() As ShipArray

Secondly, you want to be referencing Ship, not the type ShipArray, in the ReDim:

ReDim Preserve Ship(blah)



When i change

Public Type ShipArray

to

dim ship() as shiparray


it says all of the other things inside the public type


(Name As String ' ship's name
Icon As Integer ' icon (graphic) number of the ship
x As Integer ' current X coordinate on map
y As Integer ' current Y coordinate on map
Type As Integer ' what kind of ship is it
HitPtMax As Integer ' ships maximum hit points
HitPtCur As Integer ' ships current hit points
Alive As Integer '1 = there 0 = not there)


are invalid outside of type block

Thanks for bearing with me

Agent707
03-08-2004, 10:25 AM
Dim ShipMax, ShipMin, TotShips As Integer

The above is not declaring each variable as an Integer, only TotShips is an Integer, the other 2 are Variants. You have to declare each variable with a data type seperatly.
Dim ShipMax As Integer, ShipMin As Integer, TotShips As Integer

---------

One other bit of advice, I would switch the wording of your "Type" and Array.
Public Type ShipArray ' Here, you are not defining an array, but rather a Type (a Ship).

I would do it like:

Public Type Ship
blah
blah
End Type

Public ShipArray(10) as Ship
Not Global, but Public

That is more descriptive of your variables and types.

Minalth
03-08-2004, 10:29 AM
Dim ShipMax, ShipMin, TotShips As Integer

The above is not declaring each variable as an Integer, only TotShips is an Integer, the other 2 are Variants. You have to declare each variable with a data type seperatly.
Dim ShipMax As Integer, ShipMin As Integer, TotShips As Integer

---------

One other bit of advice, I would switch the wording of your "Type" and Array.
Public Type ShipArray ' Here, you are not defining an array, but rather a Type (a Ship).

I would do it like:

Public Type Ship
blah
blah
End Type

Public ShipArray(10) as Ship
Not Global, but Public

That is more descriptive of your variables and types.



OK

thanks a lot, i thaught all of them would be variables :)

and i thaught that was an array (laughs) im not good at this stuff yet

thanks a lot

Minalth
03-08-2004, 11:00 AM
Declare Function BitBlt Lib "gdi32" _
(ByVal hDestDC As Long, _
ByVal x As Long, _
ByVal y As Long, _
ByVal nWidth As Long, _
ByVal nHeight As Long, _
ByVal hSrcDC As Long, _
ByVal xSrc As Long, _
ByVal ySrc As Long, _
ByVal dwRop As Long) As Long


Dim x As Integer

Public Type Ship ' define the contents of the ships Array
Name As String ' ship's name
Icon As Integer ' icon (graphic) number of the ship
x As Integer ' current X coordinate on map
y As Integer ' current Y coordinate on map
Type As Integer ' what kind of ship is it
HitPtMax As Integer ' ships maximum hit points
HitPtCur As Integer ' ships current hit points
Alive As Integer '1 = there 0 = not there
End Type
Global ShipArray() As Ship ' create space for 10 ships

Dim ShipMax, ShipMin, TotShips As Integer


Sub MainLoop()


End Sub


Sub CreateShip(ByVal ShipType As Integer)
'this routine creates a new Ship and adds it to the array
' item's:
' Calling Arguments
' ShipType=0 create a random Ship
' ShipType=# create that Ship
' returning arguments
' none, CurShipNo% hold current Ship number
' expected variables
'If Not Ship Is Nothing Then
ShipMax = UBound(Ship)
ShipMin = LBound(Ship)
'End If
TotShips = (ShipMax - ShipMin)

If ShipType = 0 Then ' random object desired, pick the object
CurShipType% = Int(Rnd * 5) + 1
End If
If CurShipType% < 1 Or CurShipType% > 5 Then ' check for invalid Ship no
MsgBox "CreateShip discovered invalid CurShipType% of" + Str(CurShipType%)
End
End If

' now find an empty spot in the Ship array or append to the end
CurShipNo% = 0
For x% = 1 To TotShips
If ShipArray(x%).Alive = 0 Then CurShipNo% = x%
Next x%
If CurShipNo% = 0 Then
ReDim Preserve ShipArray((UBound(Ship) + 1)) '<----------------------------------------------------------------
CurShipNo% = UBound(Ship)
End If
' this set of code is the same for all Ships
ShipArray(CurShipNo%).Icon = CurShipNo% 'use the Ship number as its icon
ShipArray(CurShipNo%).x = 0
ShipArray(CurShipNo%).y = 0 '''''''''''''''''''''''''MAKE THIS RANDOM------ (this is a note to self, ignore it)
ShipArray(CurShipNo%).Type = CurShipType%

Select Case CurShipType% ' select a section of code based on the value of CurShipType%
Case 1
ShipArray(CurShipNo%).Name = "Type1"
ShipArray(CurShipNo%).Alive = 1
ShipArray(CurShipNo%).HitPtMax = 1
Case 2
ShipArray(CurShipNo%).Name = "Type2"
ShipArray(CurShipNo%).Alive = 1
ShipArray(CurShipNo%).HitPtMax = 3 + Rnd * 3
Case 3
ShipArray(CurShipNo%).Name = "Type3"
ShipArray(CurShipNo%).Alive = 1
ShipArray(CurShipNo%).HitPtMax = 5 + Rnd * 5
Case 4
ShipArray(CurShipNo%).Name = "Type4"
ShipArray(CurShipNo%).Alive = 1
ShipArray(CurShipNo%).HitPtMax = 10 + Rnd * 5
Case 5
ShipArray(CurShipNo%).Name = "Type5"
ShipArray(CurShipNo%).Alive = 1
ShipArray(CurShipNo%).HitPtMax = 15 + Rnd * 10
Case Else ' something is wrong because an invalid CurShip% was used
MsgBox "CreateShip discovered invalid CurShipType% of" + Str(CurShipType%)
End
End Select

' Set "Current" levels equal to "Max" levels
ShipArray(CurShipNo%).HitPtCur = ShipArray(CurShipNo%).HitPtMax


End Sub



I tried your thing , and I get an error with

ShipMax = UBound(Ship)
ShipMin = LBound(Ship)


it says that there is a type mismatch... I think its something I did when I swapped ship and shiparray

Thanks again, and sorry about the mess I have made

GavinO
03-08-2004, 11:05 AM
Ship is the type; ShipArray is the name of the array. When you call UBound or LBound, you want to use the name of the array:

ShipMin=LBound(ShipArray)
ShipMax=UBound(ShipArray)

The only place that you should be using the type name is when you declare the array; after that, use the name of the array.

Minalth
03-08-2004, 11:36 AM
OK, I changed it, and I get a subscript out of range error

at this time, ship min = nothing
lbound = <subscript out of range>
shiparrya = empty

ShipMin = LBound(ShipArray)
ShipMax = UBound(ShipArray)



I have ReDim Ship(10) in my formload thingy so i dont see what is wrong with it...

thanks in advance

OnErr0r
03-08-2004, 11:38 AM
If a dynamic array has not been redimmed then you cannot use LBound or UBound functions. Try using this function first to determine if it's been redimmed:


' Usage; pass "Not arrayname" to the function
' If the array is not redimmed, the compliment of the array pointer is all ones
' If the array is redimmed, the value is the compliment of the pointer
Public Function IsArrayEmpty(ByVal lArrayPointer As Long) As Long
IsArrayEmpty = (lArrayPointer = -1)
End Function

Minalth
03-08-2004, 11:51 AM
If a dynamic array has not been redimmed then you cannot use LBound or UBound functions. Try using this function first to determine if it's been redimmed:


' Usage; pass "Not arrayname" to the function
' If the array is not redimmed, the compliment of the array pointer is all ones
' If the array is redimmed, the value is the compliment of the pointer
Public Function IsArrayEmpty(ByVal lArrayPointer As Long) As Long
IsArrayEmpty = (lArrayPointer = -1)
End Function



I put the function in my module, but I dont know what the compliment of something is...

From what I do understand I am to call that function, and use IArrayPointer instead of ubound and lbound?

DaftasBrush
03-08-2004, 12:06 PM
I have ReDim Ship(10) in my formload thingy so i dont see what is wrong with it...


Should be Redim ShipArray(10)
Then Lbound(ShipArray) = 0, and Ubound(ShipArray) = 10
unless you've got Option Base set somewhere (and if you don't know what that is, don't worry)

Oh And.....

Dim ShipMax, ShipMin, TotShips As Integer
' should be
Dim ShipMax as Integer, ShipMin as Integer, TotShips As Integer

Otherwise Shipmax and Shipmin are variants, not integers

Oh And..... do this
CurShipNo% = 0
For x% = 1 To TotShips
If ShipArray(x%).Alive = 0 Then CurShipNo% = x%
Next x%
If CurShipNo% = 0 Then
ReDim Preserve ShipArray((UBound(Ship) + 1)) ' <-- Change Ship to ShipArray
CurShipNo% = UBound(Ship) ' <-- Change Ship to ShipArray
End If
And this will find the last ship that's not alive, but will search through all the available ships, even when it's found one... could do with an Exit For... and will never use the first (0th) element of the array, if you have one (see above regarding Option Base)

Any thing else?

Minalth
03-08-2004, 01:31 PM
Unfortunately, yes :(

I get a subscript out of range error with this hilighted:

ShipMin = LBound(ShipArray)

EDIT:

I forgot to say thanks

thanks!

OnErr0r
03-08-2004, 01:35 PM
If IsArrayEmpty(Not ShipArray) Then Redim ShipArray(SizeGoesHere)

GavinO
03-08-2004, 01:35 PM
The complement of a number is the result of inverting all the bits in a binary representation:

Lets take the number 13. In binary:

1101

The complement would be:

0010

The idea is that if you combine them with AND, you get 0:

1101
AND 0010
--------
0000

Minalth
03-09-2004, 02:47 AM
ReDim Preserve ShipArray((UBound(Ship) + 1)) 'make the array bigger

It says that there is a type mismatch

I changed some other stuff too so here is the whole thing:


Declare Function BitBlt Lib "gdi32" _
(ByVal hDestDC As Long, _
ByVal X As Long, _
ByVal Y As Long, _
ByVal nWidth As Long, _
ByVal nHeight As Long, _
ByVal hSrcDC As Long, _
ByVal xSrc As Long, _
ByVal ySrc As Long, _
ByVal dwRop As Long) As Long

Dim Temp As Integer

Dim X As Integer

Public Type Ship ' define the contents of the ships Array
Name As String ' ship's name
Icon As Integer ' icon (graphic) number of the ship
X As Integer ' current X coordinate on map
Y As Integer ' current Y coordinate on map
Type As Integer ' what kind of ship is it
HitPtMax As Integer ' ships maximum hit points
HitPtCur As Integer ' ships current hit points
Alive As Integer '1 = there 0 = not there
End Type
Global ShipArray() As Ship ' create space for 10 ships

Dim ShipMax As Integer, ShipMin As Integer, TotShips As Integer



Sub MainLoop()


End Sub

' Usage; pass "Not arrayname" to the function
' If the array is not redimmed, the compliment of the array pointer is all ones
' If the array is redimmed, the value is the compliment of the pointer
Public Function IsArrayEmpty(ByVal lArrayPointer As Long) As Long
IsArrayEmpty = (lArrayPointer = -1)
End Function

Sub CreateShip(ByVal ShipType As Integer)
'this routine creates a new Ship and adds it to the array
' item's:
' Calling Arguments
' ShipType=0 create a random Ship
' ShipType=# create that Ship
' returning arguments
' none, CurShipNo% hold current Ship number
' expected variables

If ShipType = 0 Then
ShipType = (Rnd * 5)
ShipType = Round(ShipType, 0)
End If
CurShipType% = ShipType

If IsArrayEmpty(Not ShipArray) Then ReDim ShipArray(10)
ShipMin = LBound(ShipArray)
ShipMax = UBound(ShipArray)

TotShips = (ShipMax - ShipMin)

CurShipNo% = 0
For X% = 1 To TotShips
If ShipArray(X%).Alive = 0 Then CurShipNo% = X%
Next X%
If CurShipNo% = 0 Then
ReDim Preserve ShipArray((UBound(Ship) + 1)) 'make the array bigger
CurShipNo% = UBound(Ship) 'make the CurShipNo% the new space in the array
End If

' now find an empty spot in the Ship array or append to the end
CurShipNo% = 0
For X% = 1 To TotShips
If ShipArray(X%).Alive = 0 Then CurShipNo% = X%
Next X%
If CurShipNo% = 0 Then
ReDim Preserve ShipArray((UBound(Ship) + 1))
CurShipNo% = UBound(Ship)
End If

If CurShipType% = 0 Then
CurShipType% = 1
End If


' this set of code is the same for all Ships
ShipArray(CurShipNo%).Icon = CurShipNo% 'use the Ship number as its icon
ShipArray(CurShipNo%).X = 0
ShipArray(CurShipNo%).Y = 0 '''''''''''''''''''''''''MAKE THIS RANDOM------ (this is a note to self, ignore it)
ShipArray(CurShipNo%).Type = CurShipType%

Randomize

Select Case CurShipType% ' select a section of code based on the value of CurShipType%
Case 1
ShipArray(CurShipNo%).Name = "Type1"
ShipArray(CurShipNo%).Alive = 1
ShipArray(CurShipNo%).HitPtMax = 1
Case 2
ShipArray(CurShipNo%).Name = "Type2"
ShipArray(CurShipNo%).Alive = 1
ShipArray(CurShipNo%).HitPtMax = 9
Case 3
ShipArray(CurShipNo%).Name = "Type3"
ShipArray(CurShipNo%).Alive = 1
ShipArray(CurShipNo%).HitPtMax = 25
Case 4
ShipArray(CurShipNo%).Name = "Type4"
ShipArray(CurShipNo%).Alive = 1
ShipArray(CurShipNo%).HitPtMax = 50
Case 5
ShipArray(CurShipNo%).Name = "Type5"
ShipArray(CurShipNo%).Alive = 1
ShipArray(CurShipNo%).HitPtMax = 150
Case Else ' something is wrong because an invalid CurShip% was used
MsgBox "CreateShip discovered invalid CurShipType% of" + Str(CurShipType%)
End
End Select

' Set "Current" levels equal to "Max" levels
ShipArray(CurShipNo%).HitPtCur = ShipArray(CurShipNo%).HitPtMax


End Sub



Dont bother answering, I made a new post, thanks a lot anyway

Minalth
03-09-2004, 04:27 AM
When I try to run my program, it says this line is wrong:

ReDim Preserve ShipArray((UBound(Ship) + 1)) 'make the array bigger

It says that there is a type mismatch

here is the whole thing:


Declare Function BitBlt Lib "gdi32" _
(ByVal hDestDC As Long, _
ByVal X As Long, _
ByVal Y As Long, _
ByVal nWidth As Long, _
ByVal nHeight As Long, _
ByVal hSrcDC As Long, _
ByVal xSrc As Long, _
ByVal ySrc As Long, _
ByVal dwRop As Long) As Long

Dim Temp As Integer

Dim X As Integer

Public Type Ship ' define the contents of the ships Array
Name As String ' ship's name
Icon As Integer ' icon (graphic) number of the ship
X As Integer ' current X coordinate on map
Y As Integer ' current Y coordinate on map
Type As Integer ' what kind of ship is it
HitPtMax As Integer ' ships maximum hit points
HitPtCur As Integer ' ships current hit points
Alive As Integer '1 = there 0 = not there
End Type
Global ShipArray() As Ship ' create space for 10 ships

Dim ShipMax As Integer, ShipMin As Integer, TotShips As Integer



Sub MainLoop()


End Sub

' Usage; pass "Not arrayname" to the function
' If the array is not redimmed, the compliment of the array pointer is all ones
' If the array is redimmed, the value is the compliment of the pointer
Public Function IsArrayEmpty(ByVal lArrayPointer As Long) As Long
IsArrayEmpty = (lArrayPointer = -1)
End Function

Sub CreateShip(ByVal ShipType As Integer)
'this routine creates a new Ship and adds it to the array
' item's:
' Calling Arguments
' ShipType=0 create a random Ship
' ShipType=# create that Ship
' returning arguments
' none, CurShipNo% hold current Ship number
' expected variables

If ShipType = 0 Then
ShipType = (Rnd * 5)
ShipType = Round(ShipType, 0)
End If
CurShipType% = ShipType

If IsArrayEmpty(Not ShipArray) Then ReDim ShipArray(10)
ShipMin = LBound(ShipArray)
ShipMax = UBound(ShipArray)

TotShips = (ShipMax - ShipMin)

CurShipNo% = 0
For X% = 1 To TotShips
If ShipArray(X%).Alive = 0 Then CurShipNo% = X%
Next X%
If CurShipNo% = 0 Then
ReDim Preserve ShipArray((UBound(Ship) + 1)) 'make the array bigger
CurShipNo% = UBound(Ship) 'make the CurShipNo% the new space in the array
End If

' now find an empty spot in the Ship array or append to the end
CurShipNo% = 0
For X% = 1 To TotShips
If ShipArray(X%).Alive = 0 Then CurShipNo% = X%
Next X%
If CurShipNo% = 0 Then
ReDim Preserve ShipArray((UBound(Ship) + 1))
CurShipNo% = UBound(Ship)
End If

If CurShipType% = 0 Then
CurShipType% = 1
End If


' this set of code is the same for all Ships
ShipArray(CurShipNo%).Icon = CurShipNo% 'use the Ship number as its icon
ShipArray(CurShipNo%).X = 0
ShipArray(CurShipNo%).Y = 0 '''''''''''''''''''''''''MAKE THIS RANDOM------ (this is a note to self, ignore it)
ShipArray(CurShipNo%).Type = CurShipType%

Randomize

Select Case CurShipType% ' select a section of code based on the value of CurShipType%
Case 1
ShipArray(CurShipNo%).Name = "Type1"
ShipArray(CurShipNo%).Alive = 1
ShipArray(CurShipNo%).HitPtMax = 1
Case 2
ShipArray(CurShipNo%).Name = "Type2"
ShipArray(CurShipNo%).Alive = 1
ShipArray(CurShipNo%).HitPtMax = 9
Case 3
ShipArray(CurShipNo%).Name = "Type3"
ShipArray(CurShipNo%).Alive = 1
ShipArray(CurShipNo%).HitPtMax = 25
Case 4
ShipArray(CurShipNo%).Name = "Type4"
ShipArray(CurShipNo%).Alive = 1
ShipArray(CurShipNo%).HitPtMax = 50
Case 5
ShipArray(CurShipNo%).Name = "Type5"
ShipArray(CurShipNo%).Alive = 1
ShipArray(CurShipNo%).HitPtMax = 150
Case Else ' something is wrong because an invalid CurShip% was used
MsgBox "CreateShip discovered invalid CurShipType% of" + Str(CurShipType%)
End
End Select

' Set "Current" levels equal to "Max" levels
ShipArray(CurShipNo%).HitPtCur = ShipArray(CurShipNo%).HitPtMax


End Sub



anyone know what is wrong?

thanks in advance
minalth

Andyh
03-09-2004, 05:05 AM
I think you forgot to put the parenthesis after the array name:

ReDim Preserve ShipArray((UBound(Ship()) + 1)) 'make the array bigger

Timbo
03-09-2004, 05:15 AM
'Ship' (your UDT) is not an array, thus you cannot call 'UBound(Ship)'.

Andyh
03-09-2004, 05:27 AM
you need

ReDim Preserve ShipArray((UBound(ShipArray()) + 1)) 'make the array bigger

or

ReDim Preserve ShipArray((UBound(ShipArray()) + 1)) as ship 'make the array bigger

(whichever works)

Minalth
03-09-2004, 06:06 AM
Thanks a lot!

i get confused between the array and the ship thing :(

I am getting no errors now, but when I call CreateShip(0) or CreateShip(1) I get lists of 0s when I am supposed to get different values

I am using this:


Private Sub cmdStart_Click()
CreateShip (0)
frmStartup.Hide ' remove the options form from the screen
frmGame.Show ' show the blank form

' Test: create 20 random ships and print their stats
For X% = 1 To 20
I% = 0
Call CreateShip(I%)
frmGame.Print ShipArray(CurShipNo%).Name, ShipArray(CurShipNo%).Alive, ShipArray(CurShipNo%).HitPtMax
Next X%
End Sub



I have this on frmStartup, and it is showing stats on frmGame.

The createship thingy is in a module.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum