News:

Come Chat with us live! Learn how HERE!

Main Menu

Client side scripting, quick question

Started by Curse, June 16, 2010, 01:07:24 PM

Curse

how are functions made with args inside of it, i am new to C, but have been coding torque script

anyways

what i am trying to accomplish is remaking the say function, but my function using the say, for example:

if i type (my created function -->) say_chat hello

it then puts hello into the say function

idk how its made, but like

say_chat(texthere)
{
say texthere;
}

thx for anyones help, im just trying to understand a few things


F50

If you're trying to understand function calls in C, you'd best do it with a more complicated version of hello world, not trem.

There's a nice tutorial that I learned C from here: http://www.le.ac.uk/users/rjm1/c/index.html  I highly recommend going through a C tutorial, even if not this one. C teaches you quite a few things that other languages use but don't bother to show you, and I highly doubt torque script is similar enough to C for you to be able to do very much without having a better grip on how things work.

Also, What exactly are you trying to do? I see a few little pieces, but I imagine you have something bigger in mind.
"Any sufficiently advanced stupidity is indistinguishable from malice." -- Grey's Law