Author Topic: How to start out?  (Read 2873 times)

I decided I'm gonna try Scripting/coding or whatever you wanna call it. Can somebody teach me, or tell me ways to practice or whatever?

Also, what are the limits? I honestly don't know anything about this stuff.


Limits: your imagination

Honestly, coding is cool as forget. It's like being god in a game, you can do whatever you like and change everything however you like.

For learning, read other scripts. They're practically English and make sense to new coders. Try using basic ideas that you grasp to write your own little codes and when you don't understand something or can't get it to work post here.

Ok so I was screwing around and tried to do this:
Code: [Select]
function test()
{
echo("MessageBoxOK("Hello","Hello World!");
}

test();

Basically I was trying to make that text box appear when i typed test(); in the console, and it didnt work. What did I do wrong?

Ok so I was screwing around and tried to do this:
Code: [Select]
function test()
{
echo("MessageBoxOK("Hello","Hello World!");
}

test();

Basically I was trying to make that text box appear when i typed test(); in the console, and it didnt work. What did I do wrong?

Try servercmdtest() instead.

Then you can try /test instead. At least as far as my knowledge goes.

Try servercmdtest() instead.

Then you can try /test instead. At least as far as my knowledge goes.
Can you write out how to type the code?

Try servercmdtest() instead.

Then you can try /test instead. At least as far as my knowledge goes.
Stop.


Stop.

The hell am I doing wrong.


Last time I ever try to help someone with code ever again.

Stop.


What was wrong with it? If it was wrong can you type out the correct way?

I think I wasnt clear on how to get a functionherelol(); to work.

Using slash commands is ok, but it didnt answer your question.

Still, you could use it for a /test command if you really wanted.

I think I wasnt clear on how to get a functionherelol(); to work.

Using slash commands is ok, but it didnt answer your question.

Still, you could use it for a /test command if you really wanted.
Oh. Then what did I do wrong and how do i fix it?

Ok so I was screwing around and tried to do this:
Code: [Select]
function test()
{
echo("MessageBoxOK("Hello","Hello World!");
}

test();
Your syntax is wrong. You have two opening parentheses but only one closing parentheses.
Also, you have an opening quotation mark in front of MessageBoxOk, but no closing one. Quotations are pretty important in torque, in that

Code: [Select]
function test()
{
echo("MessageBoxOK("Hello","Hello World!")");
}

test();
Will make the phrase MessageBoxOK("Hello","Hello World!") appear in your console, but

Code: [Select]
function test()
{
MessageBoxOK("Hello","Hello World!");
}

test();
Should make test(); open the box you're looking for.

Also, echo is used to make your console say things, so you really shouldn't have it.

Should make test(); open the box you're looking for.
It still didn't work...

Your syntax is wrong. You have two opening parentheses but only one closing parentheses.
Also, you have an opening quotation mark in front of MessageBoxOk, but no closing one. Quotations are pretty important in torque, in that

Code: [Select]
function test()
{
echo("MessageBoxOK("Hello","Hello World!")");
}

test();
Will make the phrase MessageBoxOK("Hello","Hello World!") appear in your console, but

Code: [Select]
function test()
{
MessageBoxOK("Hello","Hello World!");
}

test();
Should make test(); open the box you're looking for.

Also, echo is used to make your console say things, so you really shouldn't have it.
No will not wtf is wrong with you.
You have to prefix the inner quotation marks with a \.

The hell am I doing wrong.


Last time I ever try to help someone with code ever again.
Because what the OP needs has nothing to do with a server.