using pineAppleFishes;
using System;
using blah;
using somethingElse;
//These things above are called references. The ones above(with the exception of System) are made up and should not be used in your code unless you have these DLL's on your computer.
//The scripthook.dll in your GTAIV directory is a reference as well. This does not mean every DLL is referable.
//";" is needed at the end of every single line of code. The exceptions are classes, methods and cases(cases are a little complex and shouldn't be followed in this brief explanation. Follow up in your own time).
//This is a single line comment
/*
Comments can be done like so as well.(Between two backslash astris's)
Other things may work for various languages, but the following code is in c# (CSharp)
*/
//A class is the first thing in your script
public class FirstClass
{
static void Main(string[] args)
{
//void means this method will not return any value, yet code will run
//Variables:
/*
In C# every variable has a type: Int(Whole numbers), string("TEXT Inside These Quotation marks"), float(Numbers with decimals but with an "f" afterwards for the definition of float(5.5f)),double(Same as a float but more precise and no use of the letter "f" afterwards needed). There are more variable types but aren't necessarily used to often.
*/
//Lets make a few:
string myString = "Hello, this is a string";
int myInt = 5;
double myFirstDouble = 5.76775342332;
float myFloat = 5.5f;
/*
These are basic demonstrations. You can make anything possible(to certain degrees) with variables.
*/
//Lets put all this into test.
//The below code is for use with the console library within Visual Studio. Although you //can compile C# scripts with a standalone compiler. (Search at your own discretion)
//Sets variables
string myString2 = "5.5";
double myDouble = double.Parse(myString2);
//This code above converts the string to a double
//This will write the myDouble variable to the console and it should be 5.5
Console.WriteLine(myDouble);
//Keeps the console from closing
Console.Read();
}
}
This is not a full tutorial, this is only something I have made up in the last 5 or so minutes.