Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: takashi on March 12, 2007, 05:58:02 pm
-
where might i find the uncompiled 3.6.9 source code? im learning code and need something to mess around with.
-
where might i find the uncompiled 3.6.9 source code? im learning code and need something to mess around with.
In CVS.
-
all i can see is a compiled .exe.
-
all i can see is a compiled .exe.
Then you're obviously not looking hard enough. :P
-
i check every topic in the "recent builds" forum, where i think the CVS is located.
-
i check every topic in the "recent builds" forum, where i think the CVS is located.
That's not where CVS is located.
-
You can either get it with a CVS client as explained admirably by Karajorma in This Post (http://www.hard-light.net/forums/index.php/topic,41234.msg842224.html#msg842224), or you can view it in your browser Here (http://fs2source.warpcore.org/cgi-bin/cvsweb/cvsweb.cgi/).
-
You can either get it with a CVS client as explained admirably by Karajorma in This Post (http://www.hard-light.net/forums/index.php/topic,41234.msg842224.html#msg842224), or you can view it in your browser Here (http://fs2source.warpcore.org/cgi-bin/cvsweb/cvsweb.cgi/).
(http://image.space.rakuten.co.jp/lg01/57/0000128357/09/imgddbdbe62j98csw.jpeg)
Oh, you're no fun anymore! :doubt:
-
i see i can view it. but i cant dowlaod it. :\
-
You can either get it with a CVS client as explained admirably by Karajorma in This Post (http://www.hard-light.net/forums/index.php/topic,41234.msg842224.html#msg842224)...
-
Well... getting started can certainly be a bit overwhelming, and I'm in a helpful mood tonight, so here you go: http://www.badongo.com/file/2450909 (http://www.badongo.com/file/2450909). Unless I accidentally opened up the wrong workspace at some point recently, that should be a clean and unmodified 3.6.9 code tree. Just unzip it to a directory of your choice and you should be good to go.
-
thanks! looking at this code is realy helping me learn how to do stuff...
}
int i;
void Shootstuff();
for(i = 0; i < 42; i++)
{
shootStuff();
}
//Declare some functions
void shootshivans();
void shootntf();
void shootwingmen();
//Give ourselves a variable
int a = 2;
switch(a)
{
case 0: //If a is 0...
shootshivans(); //...shoot down shivans!
break; //We're done, jump to the end of the code block.
case 1: //If a is 1...
shootNTF(); //...now ya gotta shoot down NTF ships!
break;
default: //If none of the above match...
shootwingmen(); //...shoot yur wingmen....0_0.
//Since a IS 2, we'll be shooting down alpha 1's wingmen
break;
}
----this is part of nether code blocks, but put in the post for distinction------------
struct ship
{
ship name[alpha 1];
unsinged int shields;
unsned int weight;
};
intkaamosshootship (ship alpha_1)
{
for(alpha_1.shields > 0; alpha_1.shields--);
}
kaamosshootship (terranship);
int kaamosshoot ship (ship *alpha_1)
{
for (;alpha_1->shields > 0; alpha_1->shields--);
}
did i mess up?
-
thanks! looking at this code is realy helping me learn how to do stuff...
}
int i;
void Shootstuff();
for(i = 0; i < 42; i++)
{
shootStuff();
}
//Declare some functions
void shootshivans();
void shootntf();
void shootwingmen();
//Give ourselves a variable
int a = 2;
switch(a)
{
case 0: //If a is 0...
shootshivans(); //...shoot down shivans!
break; //We're done, jump to the end of the code block.
case 1: //If a is 1...
shootNTF(); //...now ya gotta shoot down NTF ships!
break;
default: //If none of the above match...
shootwingmen(); //...shoot yur wingmen....0_0.
//Since a IS 2, we'll be shooting down alpha 1's wingmen
break;
}
----this is part of nether code blocks, but put in the post for distinction------------
struct ship
{
ship name[alpha 1];
unsinged int shields;
unsned int weight;
};
intkaamosshootship (ship alpha_1)
{
for(alpha_1.shields > 0; alpha_1.shields--);
}
kaamosshootship (terranship);
int kaamosshoot ship (ship *alpha_1)
{
for (;alpha_1->shields > 0; alpha_1->shields--);
}
did i mess up?
you have a for loop which increments i a total of 41 times, but i is not referenced in the loop. you can also declare i in the for itself:
for(int i = 0; i < 42; i++){}
but either way, all you've managed to do could be done with
int i = 41;
your compiler is probably going to scream at 'unsned' and 'unsinged' being undeclared identifiers, might want to add some letters/rearrange them :p
the last 2 functions would be more clear as while or do-while loops instead of a for, though the for loop does work
oh, and you don't need a break after the default of the switch
-
http://www.hard-light.net/wiki/index.php/Coding_In_C
-
0. Thou shalt not dereference a null pointer.
1. Thou shalt not dereference a null pointer, in any case whatsoever.
2. dmr cannot stress this enough: thou shalt not dereference a null pointer.
3. Thou shalt not dereference a null pointer. We really do mean it.
4. We cannot tell thee enough how important it is that thee not dereference a null pointer.
5. Under no circumstance shalt thee dereference a null pointer.
6. Move not all null pointer, for great justice.
7. www.thoushaltnotdereferenceanullpointer.com
8. When we tell thee not to dereference a null pointer, thou shalt do it. I mean not do it. I mean ... I knoweth what I mean.
9. Steve Ballmer will ****ing kill you if you so much as think about hiring someone who dereferences a null pointer.
10. There shall be no eleventh commandment.
-
#include <iostream>
using namespace std;
int main ()
{
int a;
cout << "USERNAME GENERAOR. ";
cout << "follow onscreen intructions and recieve a username. ";
cout << "Please enter a number: ";
cin >> a;
cout << "you entered: " << a;
int b;
cout << " enter a noun: ";
cin >> b;
cout << "the noun you entered is: " << b;
int c;
cout << "please enter your age: ";
cin >> c;
cout << "the entered age is: << b;
// declaring variables:
int a, b, c;
int result;
// process:
a = a;
b = b;
c = c
a = a + c;
result = b + a;
// print out the result:
cout << result;
cout << "this is your username ";
return 0;
}
-
:wtf:
Did you try compiling that before posting it? You tried to put a noun (word) into an int variable, which just won't work the way you want. You need to make a, b, and c strings (because you can still put an int into a string), and not redeclare the same variable names later on, because all you do is confuse the compiler. You're also missing 2 semicolons.
#include <iostream>
#include <string>
using namespace std;
int main(){
string a,b,c;
cout << "USERNAME GENERATOR.\nFollow the onscreen instructions and recieve a username."
<< "\nPease enter a number: ";
cin >> a;
cout << "You entered: " << a
<< "\nEnter a noun: ";
cin >> b;
cout << "The noun you entered is " << b
<< "\nPlease enter your age: ";
cin >> c;
cout << "The entered age is: " << c << endl;
string result;
result = a + b + c;
cout << "Your username is " << result << endl;
return 0;
}
-
age has to be multiplied by number, and then noun+(age+number)
your fix ruined it.
-
nowhere is multiplication used, and you've contradicted yourself
-
You cannot assign a String an Int value, Int values are signed Integer, usually 2 Bytes long, which allows you to hold a number between 32767 and -32768, but that's all. Assigning a variable to it will either result in an error or a bogus result.
-
you can stream numbers into a string, but you can't perform math on them... for the purpose of what he posted, a string consiting of numbers works
-
b+a+c
fixed! if a word counts as a value.....
-
you can stream numbers into a string, but you can't perform math on them... for the purpose of what he posted, a string consiting of numbers works
Well, it was this part that confuses me...
// declaring variables:
int a, b, c;
When compared with this...
cout << " enter a noun: ";
cin >> b;
To my mind, entering text into an Integer defined variable would cause a crash, though, I'll freely admit, I haven't got round to learning C++ yet, hell, they're making me code in VB.net at the moment, that's like Frontpage meets Access and a thoroughly horrible experience :(
Also, from personal experience, I find you tend to need to define the variable before you start filling them, however, this just may be part of how C++ works.
Edit2: Ah my mistake, they are defined twice, though b is still set as an integer.
-
You cannot assign a String an Int value, Int values are signed Integer, usually 2 Bytes long, which allows you to hold a number between 32767 and -32768, but that's all. Assigning a variable to it will either result in an error or a bogus result.
Int should be 4 bytes (32-bits) on 32-bit processors which are the norm nowadays.
-
Heh, true, some of my coding knowledge is a little out of date ;)
-
when its finished (and better) i will release the username generator, or even maybe bundle it up with fs2 after some changes.