Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

hey,

does vb.net ever bother you about 2 lines of code that are exactly the same, but it only bothers you with one of them?

 

for example, these 2 lines are in the same place

 

game.LookAt = Vector3.TransformCoordinate([color=#0000ff]New[/color] Vector3(0, 0, 1),
Matrix.Multiply(Matrix.RotationY((yrot * Math.PI) / 180), Matrix.RotationX((xrot * Math.PI) / 180)))
game.LookAt = Vector3.TransformCoordinate([color=#0000ff]New[/color] Vector3(0, 0, 1),
Matrix.Multiply(Matrix.RotationY((yrot * Math.PI) / 180), Matrix.RotationX((xrot * Math.PI) / 180)))

 

except, the first one is givng an error becuase of the slash ((xrot * Math.PI) / 180))) <-- saying, "Expression expected"...

 

ive checked it, WORD FOR WORD, CHARACTRER FOR CHARACTER :-p

 

i tried compiling agian... still the same error...my friend told me it probably has something to do with hidden characters...

 

does anyone know whats goin on here???

-pent

 

[edit]i took out an "enter" so that its easier to compare the code ... and yet it still double spaces the code :p[/edit]

[edit]I removed formatting from the code and wrapped the lines. - Derek[/edit]

Edited by Derek Stone

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

Posted
Copy and paste the code in a simply (notepad, wordpad) text editor and see if there is a space or something else there. Did you type them word for word or did you copy and paste from somewhere?
"Nobody knows what I do until I stop doing it."
Posted

\There;s no 'hidden characters' in vb.net. I'd double check that your math.pi function works in the 2nd place, maybe its not declared properly (IE you may need a imports system.math or something at the top)

yeah but dude, they're in the same place, line after line from each other...

 

 

Copy and paste the code in a simply (notepad, wordpad) text editor and see if there is a space or something else there. Did you type them word for word or did you copy and paste from somewhere?

 

the line that works, i copied from MSN messenger, but the line that didnt work, i typed it in manually :p, and i checked it out in word, still the same(i even pressed control+F to search the same text, and it found the same thing

 

Its a myth.

:D!! lol

 

---

 

 

as a side note, i closed an opened my IDE again, and it ... works!

vs.net (2002) is really buggy - one time messagebox.show didnt even work, it couldnt 'recognize' it or something,

 

well thanks for the replies guys,

pent

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

  • *Experts*
Posted

I can't speak for VB.NET, but I KNOW I've had "special" characters in C# - only when cutting and pasting.

 

I found that if I cut and paste into notepad then copied from notepad right back to VS, it worked most of the time. Sometimes I had deleted the CRLF chars until two words were right next to each other (like eachother) and then manually typed a space and THEN pasted things back into VS.

 

Every once in awhile it would be stubborn. In those cases, I just retyped the line. It should only "bite" you once. After that, you'll quickly learn to cut-n-paste to notepad or manually type a line.

 

-ner

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
  • *Gurus*
Posted
There's no myth. Numerous programs (including MSN Messenger) add unreadable Unicode characters to text to mark it up. Once copied the text isn't readable by programs that don't understand the markup. Your best bet, as Nerseus stated, is to copy the text into Notepad. Alternatively, you can simply retype the text in question.
Posted

I cut and paste from all sorts of places, VB.NET, word, outlook, MSN messenger, IE, and many more and I've NEVER come accross this problem before. Not to say that I don't believe it's possible, but VB isn't C where you used to be able to scroll across 500 spaces to the left and put in an extra character to crash the compiler...

 

:p

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