Poll

Is this a good idea?

Awesome idea.
Good idea.
Okay idea.
Bad idea.
Horrible idea.

Author Topic: Suggestion AND Request: Scripting Tut..  (Read 2133 times)

Umm, I know like just a couple things about scripting and I want to know more so I could start making addons, I watched HTML and CSS videos on Youtube, lol and I wanna know how to make Blockland addons, and alot of other people do too.. I've seen TONS of posts about wanting to learn how to script so I'm just wondering.. Could someone make an add-on that shows people how to script? Like use the //(description here) and describe what something does? Like I don't get what { or } does yet.. lol and also maybe a text file to come with it that has some of the most needed things in scripting? Thx.



I may make something like this.

Well first of all, you can't make an add on without { or }. The way I learned (and am still learning) is by looking at other add ons. Look at add ons that you have and try to write something.

Well first of all, you can't make an add on without { or }. The way I learned (and am still learning) is by looking at other add ons. Look at add ons that you have and try to write something.

that is what i tried, and i just went like - "Why do you tab two or three times? O_o" and it is all so confusing :o lol.. and I still don't know what { or } means but I'll just go research =3



"Why do you tab two or three times? O_o"
Mainly because it looks neater and it's easier to tell where you made mistakes.

{ and } are for blocks of code.

I learned with Game Maker's scripting helpfile, personally; GML is somewhat similar to Torquescript.

People normally learn coding through reading others' scripts, and reading the language's wiki.

WOW, you guys are REAL noobs, if you had a clue about anything (you said you watched css tutorials and its even in there) "{" opens a function "}" closes it!

YOU ARE JUST SAD.

WOW, you guys are REAL noobs, if you had a clue about anything (you said you watched css tutorials and its even in there) "{" opens a function "}" closes it!

YOU ARE JUST SAD.

It didn't explain it. :(

EDIT: Anyways, thanks for explaining it.. =/
« Last Edit: April 20, 2009, 08:34:55 PM by Tojehusiza »

WOW, you guys are REAL noobs, if you had a clue about anything (you said you watched css tutorials and its even in there) "{" opens a function "}" closes it!

YOU ARE JUST SAD.

Well maybe you should shut the forget up and stop assuming everyone knows everything.

WOW, you guys are REAL noobs, if you had a clue about anything (you said you watched css tutorials and its even in there) "{" opens a function "}" closes it!

YOU ARE JUST SAD.

Not everyone knows that. I only knew because I have had minor scripting experience and knew that VBScript uses () to open and close, Html uses [], and so I assumed and was told later that C# uses {}.

People normally learn coding through reading others' scripts, and reading the language's wiki.

Where is the wiki? I searched Torque Script Wiki.. don't know if that has anything to do with it =o.

EDIT: Also, I got Wikipedia from the search. Lol.

Spaces and tabs have no effect on the script.

One exception...

echo("The noob");


Inside a string(a string of text) spaces matter.


{ } start and end a "set" of instructions

Code: (Torque) [Select]
%client = findplayerbyname("kal");
if(%client.getplayername() $= "Kalphiter")
{
    echo("Welcome, "@ %client.getplayername());
}

else
{
    echo("Welcome, person I don't know");
}

Is exactly the same as
Code: (Torque) [Select]
%client = findplayerbyname("kal");
if(%client.getplayername() $= "Kalphiter")
    echo("Welcome, "@ %client.getplayername());

else
    echo("Welcome, person I don't know");

You can only omit brackets if there's only one instruction.