Yes the error is that you dont target anyone.
The <appobj:ScriptExRef> is fine. That means your Start_script is running now without errors. With that working, you can change
var script := Start_Script(":healing:use_bandages", parms);
SendSysMessage(who, CStr(script));
to just
Start_Script(":healing:use_bandages", parms);
To fix the error Object doesnt support members, in the command script, put
Code:
program healme(who)
SendSysMessage(who, "Who do you want to heal?");
var patient := Target(who, TGTOPT_HELPFUL + TGTOPT_CHECK_LOS);
if (!patient)
SendSysMessage(who, "Cancelled");
return;
endif
I also added to the Target command TGTOPT_HELPFUL + TGTOPT_CHECK_LOS because its true you should be able to check LOS and it should be flagged as something helpful so healing a grey and red are criminal actions... unless you dont want these, then you can adjust to the appropriate.
As for
Code:
if (!patient)
SendSysMessage(who, "who would you like to heal?");
var patient := Target(who, TGTOPT_HELPFUL + TGTOPT_CHECK_LOS);
endif
if(!patient)
SendSysMessage(who, "Cancelled.");
return;
endif
If this script isnt used for anything else but your command, you can remove
if (!patient)
SendSysMessage(who, "who would you like to heal?");
var patient := Target(who, TGTOPT_HELPFUL + TGTOPT_CHECK_LOS);
endif
but if this is still used by double clicking bandages and stuff, leave it there. What that says is, if it doesnt have a patient (if you got here some other way then the command, you probably dont have it yet) then give you a target. If you still dont have a patient afterwards, cancel. If its only for the command, the corrections to the command script I suggested in this post will handle the targeting.