ThePentiumGuy Posted March 21, 2004 Posted March 21, 2004 (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 March 23, 2004 by Derek Stone Quote 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
samsmithnz Posted March 22, 2004 Posted March 22, 2004 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) Quote Thanks Sam http://www.samsmith.co.nz
Rick_Fla Posted March 22, 2004 Posted March 22, 2004 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? Quote "Nobody knows what I do until I stop doing it."
samsmithnz Posted March 22, 2004 Posted March 22, 2004 NO that doesn't make sense. VB.NET autoformats all the code anyway. There are no hidden characters. Its a myth. Quote Thanks Sam http://www.samsmith.co.nz
ThePentiumGuy Posted March 22, 2004 Author Posted March 22, 2004 \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 Quote 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
Rick_Fla Posted March 22, 2004 Posted March 22, 2004 Glad to hear that it worked! Quote "Nobody knows what I do until I stop doing it."
*Experts* Nerseus Posted March 22, 2004 *Experts* Posted March 22, 2004 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 Quote "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* Derek Stone Posted March 23, 2004 *Gurus* Posted March 23, 2004 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. Quote Posting Guidelines
samsmithnz Posted March 23, 2004 Posted March 23, 2004 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 Quote Thanks Sam http://www.samsmith.co.nz
*Gurus* Derek Stone Posted March 23, 2004 *Gurus* Posted March 23, 2004 If you'd like proof... Quote Posting Guidelines
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.