0

Hi! So, I'm new, and I had gotten this book on how to make an RPG.

Well, as I was typing the code, it underlined some words, but at that time I didn't think anything of them, and now its being a pain. DX

Here's my code that has some problems:
Dim device As Microsoft.DirectX.Direct3D.Device
Me.Size=New Size(800, 600)
Me.Text = ("DirectX Initialization Demo")
Me.SetStyle(ControlStyles.AllPaintingInWmPaint Or ControlStyles.Opague, True)

"Me" is being underlined in blue, and its saying its a Syntax error. How do I fix these?

I also have some other errors, such as "Declaration expected." errors, in which I have no idea what that even means. (: Please help me.

3
Contributors
5
Replies
6
Views
8 Years
Discussion Span
Last Post by rapture
0

Its never actually said what language, it just said in Visual Basic. Thats the only program I'm using, and yeah..
o-o
I'm just so confused. :/ Now I'm trying to re-write my code to see if its a code mistake somewhere but as soon as I typed the "Me.Size" ect, it was underlined in blue!

0

Okay, so, I decided to keep typing the code, and heres the code:

REM set up the presentation parameters
Dim params As New Direct3D.PresentParameters
params.Windowed=True
params.SwapEffect=Direct3D.SwapEffect.Discard
params.AutoDepthStencilFormat=Direct3D.DepthFormat.D16
params.EnabledAutoDepthStencil=True
params.BackBufferCount=1
params.BackBufferWidth=800
params.BackBufferHeight=600

all the "params", except for the very first one after Dim, is underlined in blue. It says "Declaration expected."
I don't know what that means..

0

Where you write this code?? I think you don't write them within method!! PLEASE SEND ME SNAP SHOT OF VS SCREEN SHOWS THE ERROR. It'd help me to help you!

0

You need to send him what he's asking for. Frankly, if all you're doing is copying code from a book to some software it's going to be VERY difficult for you to understand what's wrong.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.