# FinishCommand

Objects
Commands
4.9.5.0 CE
bool
bool success Whether to evaluate the ended command as successful.
int command_num Index of the command. 0 is the current command, other values indicate the following commands.
Ends a command in the command stack of an object.
public func Production(object clonk) { // Baum suchen var tree; if (!(tree = FindWorkTree(clonk))) // Kein geeigneter Baum (fertig) { Message("$TxtNomoresuitabletrees$"); clonk->FinishCommand(false, 1); return(0); } [...] }
From the sawmill script: FinishCommand is used to inform the following (super-level) commands that automatic wood production has failed. Produktion() is called through a Call command which counts as successful if the function call could be made. That's why FinishCommand must be used.
SetCommand
GetCommand
AppendCommand
AddCommand
Günther
2004-04