Code_Assassin
|
|
« Reply #320 on: November 30, 2012, 05:15:40 PM » |
|
So I'm making some lil monkeys in my game, and I store them in a generic List. I'm looping through them, with an index named 'c'. While checking if the current monkey in the list is null, the code ends up like: if(monkey[c]){//monkey do ...
lol
|
|
|
Logged
|
|
|
|
Muz
|
|
« Reply #321 on: December 03, 2012, 02:53:15 AM » |
|
items.add(NOTHING); setHeight(NOTHING);
|
|
|
Logged
|
|
|
|
Dr. Cooldude
Guest
|
|
« Reply #322 on: December 03, 2012, 03:24:52 AM » |
|
items.add(NOTHING); setHeight(NOTHING);
This kind of reminds me of the NOP instruction that some CPUs has.
|
|
|
Logged
|
|
|
|
Geti
|
|
« Reply #323 on: December 03, 2012, 04:28:09 AM » |
|
I wonder why "" when stored in a std::string is becoming some random IP address now?... if ( fscanf( thefile, "%s", ip.c_str() ) < 0 )
|
|
|
Logged
|
|
|
|
DelishusCake
Guest
|
|
« Reply #324 on: December 03, 2012, 11:02:07 AM » |
|
I'm making a simple level editor, and needed a way to grow and shrink rectangles based on button presses. It wasn't working and I think I found out why: if love.keyboard.isDown('lshit') then Editor.active.w = Editor.active.w + 2 end
|
|
|
Logged
|
|
|
|
Muz
|
|
« Reply #325 on: December 03, 2012, 06:52:06 PM » |
|
items.add(NOTHING); setHeight(NOTHING);
This kind of reminds me of the NOP instruction that some CPUs has. It's supposed to initialize stuff to 0, but I don't like putting 0 as a variable anywhere. I guess renaming it to NOP makes more sense, but the doThis(NOTHING) code in capital letters makes me giggle.
|
|
|
Logged
|
|
|
|
Sergi
|
|
« Reply #326 on: December 04, 2012, 02:11:25 AM » |
|
After wondering why part of the program isn't doing what it should, and putting breakpoints in the function that are never hit, I realized that yesterday I put at the beginning of the function in order to test a different part of the program. Painful but difficult not to laugh at the stupid mistakes...
|
|
|
Logged
|
|
|
|
Dr. Cooldude
Guest
|
|
« Reply #327 on: December 04, 2012, 03:02:08 AM » |
|
You and Muz should collaborate and make it to Couldn't resist
|
|
|
Logged
|
|
|
|
kiddRaddical
|
|
« Reply #328 on: December 14, 2012, 08:20:37 AM » |
|
Rewriting my EnemyManager in better, cleaner C# and came across a lame pun: YEEEEAAAA BOOOOOIIII. Only 90s hip-hop fans will get it
|
|
|
Logged
|
posting (too) regularly on Twitter: @EthanRedd EthanRedd.com
|
|
|
Dr. Cooldude
Guest
|
|
« Reply #329 on: December 14, 2012, 09:13:44 AM » |
|
Rewriting my EnemyManager in better, cleaner C# and came across a lame pun: YEEEEAAAA BOOOOOIIII. Only 90s hip-hop fans will get it I posted the same thing on this thread before! :D I was working on the Enemy class in my game, found this constructor: and, lol, what a nice coincidence.
|
|
|
Logged
|
|
|
|
Evan Balster
|
|
« Reply #330 on: December 14, 2012, 11:15:52 AM » |
|
You guys are a class Act {}
|
|
|
Logged
|
Creativity births expression. Curiosity births exploration. Our work is as soil to these seeds; our art is what grows from them...Wreath, SoundSelf, Infinite Blank, Cave Story+, <plaid/audio>
|
|
|
kiddRaddical
|
|
« Reply #331 on: December 14, 2012, 11:50:28 AM » |
|
You guys are a class Act {}
while(reading) thatPun -= myHealth
...what I am I doing with my life...
|
|
|
Logged
|
posting (too) regularly on Twitter: @EthanRedd EthanRedd.com
|
|
|
Dr. Cooldude
Guest
|
|
« Reply #332 on: December 14, 2012, 12:10:49 PM » |
|
You guys are a class Act {}
My constructor was real though. I promise...
|
|
|
Logged
|
|
|
|
Sergi
|
|
« Reply #333 on: December 14, 2012, 12:20:50 PM » |
|
You guys are going to like these love letters if you don't know them already. Yes, that's an actual working C program.
|
|
|
Logged
|
|
|
|
JobLeonard
|
|
« Reply #334 on: December 14, 2012, 02:50:00 PM » |
|
I'm a 90s hip-hop fan. Anyone older than twenty should get this.
|
|
|
Logged
|
|
|
|
Code_Assassin
|
|
« Reply #335 on: December 14, 2012, 03:40:55 PM » |
|
|
|
|
Logged
|
|
|
|
kiddRaddical
|
|
« Reply #336 on: December 14, 2012, 04:17:47 PM » |
|
You guys are going to like these love letters if you don't know them already. Yes, that's an actual working C program. That's amazing on so many levels; dare I ask what the output is? ( too lazy to read it for understanding. I hate the whole C family)
|
|
|
Logged
|
posting (too) regularly on Twitter: @EthanRedd EthanRedd.com
|
|
|
Sergi
|
|
« Reply #337 on: December 14, 2012, 04:23:33 PM » |
|
You guys are going to like these love letters if you don't know them already. Yes, that's an actual working C program. That's amazing on so many levels; dare I ask what the output is? ( too lazy to read it for understanding. I hate the whole C family) It's from The International Obfuscated C Code Contest. So you're not supposed to be able to understand it at first sight. From the hint file: This is a "Picking the Daisy" simulation. Now, instead of mangling a daisy, simply run this program with the number of petals desired as the argument. This is a good counter-example to peoples' complaints that C doesn't have an "English-like" syntax. Lint complains about everything - null effect, xxx may be used before set, statement not reached, return(e) and return. Lint dumps core on some systems. My personal favorite lint complaint is "warning: eroticism unused in function main". Also obviously, (char)lotte and (char*)lie are incompatible types...
|
|
|
Logged
|
|
|
|
ChevyRay
|
|
« Reply #338 on: December 15, 2012, 03:27:58 AM » |
|
Oh god I just added this line of code to FlashPunk 2 and it is 3:30 AM and what am I still doing up public function get down():Boolean { return right.down || left.down || down.down || up.down; }
|
|
|
Logged
|
|
|
|
Code_Assassin
|
|
« Reply #339 on: December 15, 2012, 09:42:48 AM » |
|
|
|
|
Logged
|
|
|
|
|