
rerout343
Joined: Aug 7, 2010
Targeted and Firing
|
Posted: Jun 26, 2011 06:34 AM
Msg. 1 of 5
After all the scripting I've done, for some reason one of the most basic commands is giving me a hard time:
(script continuous ai_health (if (= pow_ik 0) (units_set_maximum_vitality aitest (ai_heal) 0)) )
Everything looks right to me but for some reason I keep getting this error:
06.26.11 05:53:05 [nacht line 135] this is not a valid object name.: aitest (ai_heal) 0))
06.26.11 05:53:05 recompiling scripts after scenarios were merged. 06.26.11 05:53:05 [nacht line 134] this left parenthesis is unmatched.: (script continuous ai_health
I know I made something like this work before but I cannot figure out for the life of me how I did it.(Old script file is LONG gone) Edited by rerout343 on Jun 26, 2011 at 06:35 AM Edited by rerout343 on Jun 26, 2011 at 06:36 AM
|
|
|

Polamee
Joined: Feb 25, 2008
MP2SPMT's founder
|
Posted: Jun 26, 2011 07:00 AM
Msg. 2 of 5
Firstly, go double-check if your biped is really named aitest.
More importantly,units_set_maximum_vitality is not a basic command, and there seems to be something strange with the way you entered it. The syntax for units_set_maximum_vitality apparently is:
(units_set_maximum_vitality [object_list] [real] [real])
So if ai_heal is not a variable, make it one. If it already is, then remove the brackets around it, and check if that's the exact name of the variable as well.
|
|
|

rerout343
Joined: Aug 7, 2010
Targeted and Firing
|
Posted: Jun 26, 2011 07:08 AM
Msg. 3 of 5
Quote: --- Original message by: Polamee Firstly, go double-check if your biped is really named aitest. It's not a biped it's an encounter, but I was able to this before.
More importantly,units_set_maximum_vitality is not a basic command Compared to what I already have been working on, yes it is
, and there seems to be something strange with the way you entered it. The syntax for units_set_maximum_vitality apparently is:
(units_set_maximum_vitality [object_list] [real] [real])
So if ai_heal is not a variable, make it one. If it already is, then remove the brackets around it, and check if that's the exact name of the variable as well. Yes it is a variable, and yes it is typed correctly. Trust me I would not have posted asking for help if hadn't already check things like that.
Removing the Brackets did not help. I still got the same error. Edited by rerout343 on Jun 26, 2011 at 07:08 AM
|
|
|

cyboryxmen
Joined: Nov 7, 2010
--CG artist-- New mission. Refuse this Mission!
|
Posted: Jun 26, 2011 09:55 AM
Msg. 4 of 5
Learn to organize your scripts. (script continuous ai_health (if (= pow_ik 0) (units_set_maximum_vitality aitest (ai_heal) 0) ) ) Encounters are not object lists. you have to heal them one by one. -Zekilk Edited by cyboryxmen on Jun 26, 2011 at 09:56 AM
|
|
|

rerout343
Joined: Aug 7, 2010
Targeted and Firing
|
Posted: Jun 26, 2011 04:29 PM
Msg. 5 of 5
Quote: --- Original message by: cyboryxmenLearn to organize your scripts. (script continuous ai_health (if (= pow_ik 0) (units_set_maximum_vitality aitest (ai_heal) 0) ) ) Encounters are not object lists. you have to heal them one by one. -Zekilk Edited by cyboryxmen on Jun 26, 2011 at 09:56 AM Maybe it was a different command then, but I know I did this before
|
|
|
| |
|
|
 |
|