Page 1 of 1

Struct?

Posted: Thu Apr 23, 2009 4:22 pm
by SilentAngel
Is possible to make struct in MOH?
something like that:

Code: Select all

typedef struct blabla{
...
}abc, abc, ecc
or also a new type of data..I'm trying fo do some stuff but I need to use some functions as struct and typedef..is it possible? and if it is so, is it like C programming or there are differences?[/code]

Posted: Thu Apr 23, 2009 4:34 pm
by Aprop
No, its impossible... what exacly are you trying to achieve?

Posted: Thu Apr 23, 2009 10:09 pm
by $oldier Of Ra
No, I'm afraid not. Something about 'creating new functions in a language defined and controlled by an engine written in C', just sounds absurd...

Like Aprop says, what are you trying to accomplish anyways?

Posted: Fri Apr 24, 2009 2:29 pm
by Rookie One.pl
No it doesn't, SoR, it actually makes a lot of sense. It's just that the designers of this (MoHAA/FAKK2 script) language didn't see a need for this feature, and to tell the truth, you can get away without it for the most part.

Posted: Fri Apr 24, 2009 2:55 pm
by $oldier Of Ra
You must be referring to external scripts that handle the new 'function' and return the result?

Posted: Fri Apr 24, 2009 5:46 pm
by SilentAngel

Code: Select all

typedef struct data
{
  nikname[50];
  surname[50];
  name[50];
  score;
} t_data;
That's what I need to do, however I can do it even if there's none of them...it was just to make the script more easy and short, well thanks for the help. :wink:

Posted: Fri Apr 24, 2009 10:24 pm
by Rookie One.pl
Well, labels and waitthread basically replace functions.

SilentAngel, you can achieve this effect by spawning listeners and giving them custom properties.

Posted: Sat Apr 25, 2009 12:18 pm
by SilentAngel
okie dokie ty man