Commands - List them and what they do

Post your scripting questions / solutions here

Moderator: Moderators

Wertmanzzz
Lance Corporal
Posts: 21
Joined: Sun Feb 12, 2006 2:09 pm
Location: The Netherlands

Post by Wertmanzzz »

Hey uhm i found this in the tut's :
my_method:
for ( local.index =5; local.index < 20 ; local.index ++ )
{
iprintlnbold_noloc "Bla nr. " + local.index
wait 2
}
end
(It's under Methods)
But I can't get that + local.index right.
The MOHAA console ALWAYS says
BAD_TOKEN:
'+'

iprintlnbold_noloc "Bla nr. " + local.index
iprintlnbold_noloc "Bla nr. " ^

or something like that.
How can I solve this?
Thanks very much
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

iprintlnbold_noloc ("Bla nr. " + local.index)
Image
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 »

Or just skip the +. The iprintln* commands take any number of arguments and convert them all to string.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Wertmanzzz
Lance Corporal
Posts: 21
Joined: Sun Feb 12, 2006 2:09 pm
Location: The Netherlands

Post by Wertmanzzz »

Uhm i don't know what I am doing wrong...

Code: Select all

iprintlnbold_noloc ( "Flagholder his kills " + local.flagholder.kills + ", kill him!" )
I used this in Mohdm4...
The game message returned was NIL

*Note: I first did this:

Code: Select all

iprintlnbold_noloc ( "Flagholder his kills " + local.flagholder.kills )
But also, the game message returned was NIL*

How can i solve it :S is it the map/patch/something else?
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 »

The value of local.flagholder.kills is NIL.

If you're trying to retrieve the player's score, give up - it's impossible.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Wertmanzzz
Lance Corporal
Posts: 21
Joined: Sun Feb 12, 2006 2:09 pm
Location: The Netherlands

Post by Wertmanzzz »

:( ok. Well then no scores :D, lol.
Cya next time
Post Reply