Author Topic: Copy / paste codes  (Read 1818 times)

0 Members and 1 Guest are viewing this topic.

Offline Commander Zane

  • 212
  • Spoot Knight of Anvils
After having to fix the codes (Started with HUD codes) that I get off of threads one time too many, I've reached my last nerve.
When I select the code to paste into Notepad, rather than appear as it does in the code field, it comes out as such:

This is part of the new bloom code that I wanted to look at, and surprise surprise it comes out like this instead of how it should.
Quote
varying float blurSize;uniform sampler2D tex;// Gaussian Blur// 512x512 and smaller textures give best results// 2 passes requiredvoid main(){   // Echelon9 - Due to Apple not implementing array constructors in OS X's    // GLSL implementation we need to setup the arrays this way as a workaround   float BlurWeights[11];   BlurWeights[0] = 0.0402;   BlurWeights[1] = 0.0623;   BlurWeights[2] = 0.0877;   BlurWeights[3] = 0.1120;   BlurWeights[4] = 0.1297;   BlurWeights[5] = 0.1362;   BlurWeights[6] = 0.1297;   BlurWeights[7] = 0.1120;   BlurWeights[8] = 0.0877;   BlurWeights[9] = 0.0623;   BlurWeights[10] = 0.0402;   vec4 sum = texture2D(tex, gl_TexCoord[0].xy) * BlurWeights[0];#ifdef PASS_0   for (int i = 1; i < 11; i++) {      sum += texture2D(tex, vec2(clamp(gl_TexCoord[0].x - float(i) * (blurSize/2), 0.0, 1.0), gl_TexCoord[0].y)) * BlurWeights;      sum += texture2D(tex, vec2(clamp(gl_TexCoord[0].x + float(i) * (blurSize/2), 0.0, 1.0), gl_TexCoord[0].y)) * BlurWeights;   }#endif#ifdef PASS_1   for (int i = 1; i < 11; i++) {      sum += texture2D(tex, vec2(gl_TexCoord[0].x, clamp(gl_TexCoord[0].y - float(i) * (blurSize/2), 0.0, 1.0))) * BlurWeights;      sum += texture2D(tex, vec2(gl_TexCoord[0].x, clamp(gl_TexCoord[0].y + float(i) * (blurSize/2), 0.0, 1.0))) * BlurWeights;   }#endif   gl_FragColor = sum;}

With the HUD code since it does this it does not work (As I figured out when I had the initial problem of the Port HUD not displaying with Port MVPs), which forces me to waste time hitting Enter and Tab over and over until the code is as it should be. My question is since apparently copy / paste into Notepad leads to botched code, what it is that I'm apparently missing in the process.

 

Offline Jeff Vader

  • The Back of the Hero!
  • Moderator
  • 212
  • Bwahaha
Use Notepad++. Regularass Notepad has severe issues with newlines. And sucks in other regards, too.
23:40 < achillion > EveningTea: ass
23:40 < achillion > wait no
23:40 < achillion > evilbagel: ass
23:40 < EveningTea > ?
23:40 < achillion > 2-letter tab complete failure

14:08 < achillion > there's too much talk of butts and dongs in here
14:08 < achillion > the level of discourse has really plummeted
14:08 < achillion > Let's talk about politics instead
14:08 <@The_E > butts and dongs are part of #hard-light's brand now
14:08 <@The_E > well
14:08 <@The_E > EvilBagel's brand, at least

01:06 < T-Rog > welp
01:07 < T-Rog > I've got to take some very strong antibiotics
01:07 < achillion > penis infection?
01:08 < T-Rog > Chlamydia
01:08 < achillion > O.o
01:09 < achillion > well
01:09 < achillion > I guess that happens
01:09 < T-Rog > at least it's curable
01:09 < achillion > yeah
01:10 < T-Rog > I take it you weren't actually expecting it to be a penis infection
01:10 < achillion > I was not

14:04 < achillion > Sometimes the way to simplify is to just have a habit and not think about it too much
14:05 < achillion > until stuff explodes
14:05 < achillion > then you start thinking about it

22:16 < T-Rog > I don't know how my gf would feel about Jewish conspiracy porn

15:41 <-INFO > EveningTea [[email protected]] has joined #hard-light
15:47 < EvilBagel> butt
15:51 < Achillion> yes
15:53 <-INFO > EveningTea [[email protected]] has quit [Quit: http://www.mibbit.com ajax IRC Client]

18:53 < Achillion> Dicks are fun

21:41 < MatthTheGeek> you can't spell assassin without two asses

20:05 < sigtau> i'm mining titcoins from now on

00:31 < oldlaptop> Drunken antisocial educated freezing hicks with good Internet == Finland stereotype

11:46 <-INFO > Kobrar [[email protected]] has joined #hard-light
11:50 < achtung> Surely you've heard of DVDA
11:50 < achtung> Double Vaginal Double ANal
11:51 < Kobrar> ...
11:51 <-INFO > Kobrar [[email protected]] has left #hard-light []

 

Offline Commander Zane

  • 212
  • Spoot Knight of Anvils
Just gave it a try, doesn't seem like the data is pasted any differently. Unless there needs to be specific settings applied to the program.

 

Offline Jeff Vader

  • The Back of the Hero!
  • Moderator
  • 212
  • Bwahaha
Uh... weird. Step-by-step, how exactly are you copying and pasting the codes? And what browser are you using? I just tested by using the latest Notepad++ and the latest Chrome/the latest Firefox/Opera 11.10, and copying the codes both by selecting them with the mouse and selecting them with the "Select" button, then copying and pasting into Notepad++. It worked. Every time. As far as I know, there shouldn't be any setting that you need to consider for the process to work.
23:40 < achillion > EveningTea: ass
23:40 < achillion > wait no
23:40 < achillion > evilbagel: ass
23:40 < EveningTea > ?
23:40 < achillion > 2-letter tab complete failure

14:08 < achillion > there's too much talk of butts and dongs in here
14:08 < achillion > the level of discourse has really plummeted
14:08 < achillion > Let's talk about politics instead
14:08 <@The_E > butts and dongs are part of #hard-light's brand now
14:08 <@The_E > well
14:08 <@The_E > EvilBagel's brand, at least

01:06 < T-Rog > welp
01:07 < T-Rog > I've got to take some very strong antibiotics
01:07 < achillion > penis infection?
01:08 < T-Rog > Chlamydia
01:08 < achillion > O.o
01:09 < achillion > well
01:09 < achillion > I guess that happens
01:09 < T-Rog > at least it's curable
01:09 < achillion > yeah
01:10 < T-Rog > I take it you weren't actually expecting it to be a penis infection
01:10 < achillion > I was not

14:04 < achillion > Sometimes the way to simplify is to just have a habit and not think about it too much
14:05 < achillion > until stuff explodes
14:05 < achillion > then you start thinking about it

22:16 < T-Rog > I don't know how my gf would feel about Jewish conspiracy porn

15:41 <-INFO > EveningTea [[email protected]] has joined #hard-light
15:47 < EvilBagel> butt
15:51 < Achillion> yes
15:53 <-INFO > EveningTea [[email protected]] has quit [Quit: http://www.mibbit.com ajax IRC Client]

18:53 < Achillion> Dicks are fun

21:41 < MatthTheGeek> you can't spell assassin without two asses

20:05 < sigtau> i'm mining titcoins from now on

00:31 < oldlaptop> Drunken antisocial educated freezing hicks with good Internet == Finland stereotype

11:46 <-INFO > Kobrar [[email protected]] has joined #hard-light
11:50 < achtung> Surely you've heard of DVDA
11:50 < achtung> Double Vaginal Double ANal
11:51 < Kobrar> ...
11:51 <-INFO > Kobrar [[email protected]] has left #hard-light []

 

Offline Commander Zane

  • 212
  • Spoot Knight of Anvils
I'm also using the newest Notepad++, just downloaded it an hour ago. I'm on IE9, I hit "Select" on the information with the code tag, select Copy, then Paste.
It turns out the problem is IE, the code is pasted properly on FF5, so this problem is solved. :D

Edit: Didn't know just typing one part of a post command automatically made a second half. :nervous:
« Last Edit: July 01, 2011, 01:26:44 pm by Commander Zane »

  

Offline Macfie

  • 210
  • If somebody made a campaign I've probably got it
Noticed the same problem with notepad.  So I used wordpad instead and it works.
Normal people believe that if it isn't broke, don't fix it. Engineers believe that if it isn't broke, it doesn't have enough features yet.
The difference between Mechanical Engineers and Civil Engineers is:
Mechanical Engineers build weapons.  Civil Engineers build targets
An optimist sees the glass half full; the pessimist sees it half empty. An engineer sees that the glass is twice as big as it needs to be.