Author Topic: Basic torque script tutorial  (Read 7013 times)

I give a C+ for effort.

I'd say the first and most important thing for learners is indenting and to use a dev environment if you can't do it yourself.
« Last Edit: January 10, 2008, 05:14:12 PM by exidyne »

I give a C for effort.

I'd say the first and most important thing for learners is indenting and to use a dev environment if you can't do it yourself.
noted. Will add.

And you couldnt have just pointed that out instead of calling me a bumbling idiot?

Nobody called you a bumbling idiot?!

And you couldnt have just pointed that out instead of calling me a bumbling idiot?

Nobody called you a bumbling idiot?!
I apologize, that was trader saying something completely different.

And you couldnt have just pointed that out instead of calling me an bumbling idiot?


Code: [Select]
messageclient(%client,'',"You rolled a" SPC %num); :cookieMonster:

Perhaps you should read some tutorials before attempting to post your own.

Code: [Select]
echo($text1 @ "\n" @ $text2);echo($text1 NL $text2);

Code: [Select]
$num += 1;You can further save space with $num++;

Plus, wtf is he doing using global variables in a for loop?

Code: [Select]
While($t<5)
{
$num*=2;
$t++;
echo($num);
}
This is what for loops are for, argh.

That's not even a for() loop, SolarFlare.

Ephi, it should be permissable to use globals in a for loop.  Wouldn't do it very frequently, but there might be a need for it from time to time.

rkynick, let's just close this before someone else gets hurt...i mean mislead.

That's not even a for() loop, SolarFlare.
I think he was trying to say it should have been a for loop.

Ah, I see.  Well, a while() loop is fine for use in that instance anyway.  While() loops with a small number of cycles are fine.