Struct?

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
SilentAngel
Captain
Posts: 239
Joined: Wed Mar 12, 2008 8:27 pm

Struct?

Post 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]
Aprop
Major
Posts: 291
Joined: Mon Nov 17, 2008 3:40 pm

Post by Aprop »

No, its impossible... what exacly are you trying to achieve?
$oldier Of Ra
Lieutenant Colonel
Posts: 404
Joined: Sun Oct 16, 2005 7:16 pm
Location: Belgium
Contact:

Post 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?
Our official website: http://www.mohaairborne.co.cc
(Still accessible through http://mohaaclantb.tk and http://users.skynet.be/mohaaclantb/)

For all your bot needs!!!!

$oldier Of Ra.
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post 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.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
$oldier Of Ra
Lieutenant Colonel
Posts: 404
Joined: Sun Oct 16, 2005 7:16 pm
Location: Belgium
Contact:

Post by $oldier Of Ra »

You must be referring to external scripts that handle the new 'function' and return the result?
Our official website: http://www.mohaairborne.co.cc
(Still accessible through http://mohaaclantb.tk and http://users.skynet.be/mohaaclantb/)

For all your bot needs!!!!

$oldier Of Ra.
SilentAngel
Captain
Posts: 239
Joined: Wed Mar 12, 2008 8:27 pm

Post 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:
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post 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.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
SilentAngel
Captain
Posts: 239
Joined: Wed Mar 12, 2008 8:27 pm

Post by SilentAngel »

okie dokie ty man
Post Reply