Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
I am making a Bejeweled game in Visual Basic Professional 2010 (which is apart of the web browser known as Scoontz) and I stumbled across an error when trying to draw a sprite:

DrawSprite is not a member of Scoontz.Sprite

Here is the code (with the line in question in bold):

' Note that this function does NOT update the REAL postion of the cell.
Public Sub DrawCell(ByVal Surface As Graphics, ByVal Cell As Cell, _
Optional ByVal Background As Boolean = True)

' Retrieve the piece
With Pieces(Cell.PieceIndex)

' Draw its background
If Background Then
DrawBackground(Surface, New RectangleF(Cell.Position.X, Cell.Position.Y, _
Cell.Piece.Sprite.Width, Cell.Piece.Sprite.Height))
End If

' Make sure the piece index is valid
If Cell.Visible Then

' Draw the specific sprite onto an caculated area
With .Sprite
.ImageAttributes = Cell.ImageAttributes
.DrawSpirte(Surface, Cell.Position.X + Cell.Offset.X, Cell.Position.Y + Cell.Offset.Y)
End With

End If

End With

End Sub

Note, I was suggested that add a general method to draw the sprite, but when trying to debug the program, it threw an exception error. I need to know how can I fix this error so that the Bejeweled game program can draw sprites.
Posted
Updated 30-Jun-14 11:28am
v2
Comments
[no name] 30-Jun-14 17:36pm    
You would probably get a faster/better answer asking your question where people that know something about this "Scoontz" hang out. But, DrawSpirte is not the same as DrawSprite, even in VB.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900