Ceiling and kh1 problem

"ceil((({@{Tactical_Command_total},0}kh1))/20)" Trying to get this to work. Due to the fact tht Tactical command can go below 0 I need it to kh1 at 0, but I cannot seem to getit to function, I have tried writing it in various ways.
[[ceil({@{Tactical_Command_total, 0}kh1/20)]] Too many parentheses probably. Unless the taccomtotal is a die roll. Then you need to replace 0 with 0d0 instead.
That worked, however for the full thing is does not: <td>Morale</td> <td><input style="width: 30px" type="text" name="attr_Morale_Base" value="[[ceil({@{Tactical_Command_total, 0}kh1/20)]]" disabled/></td> <td><input style="width: 30px" type="text" name="attr_Morale_Change" value="0"></td> <td><input style="width: 30px" type="text" name="attr_Morale_Total" value="@{Morale_Base}+@{Moral_Change}" disabled/></td></tr> In the section for Morale_Total, it is not calculating it, it is giving me what I filled in s base... "[[{(@{Movement_Base}+@{Movement_Change}-@{hp2}-@{hp7}-@{hp14}),0}kh1]]" And this one is killing me, I need it to add all the values up, and then compare it to the 0
Most of the time, you need to have a die roll in the comparison for kh1 to work. Try putting 0d0 on one or both sides of the comparison
Thanks, but cannot figure out what you mean, I replaced the 0 with a 0d0 and it still works for the base, but not the calc
Also, I'm noticing that SkyCaptainXIII said the same thing earlier, so maybe the error is in @{Moral_Base} looking at the formula, Looking at his suggestion, I believe he may have missed a "}" after the @{Tactical_Command_total in the command. I would also suggest that you add a 0d0 to this formula as well resulting in [[ceil({@{Tactical_Command_total}+0d0, 0d0}kh1/20)]]
I did. Oops.
hmm, neither one is working, strange :(

Edited 1484148534
API Scripter
If I remember correctly, kh1 doesn't work in autocalc fields:  link might help, where other solutions are discussed.
Jakob said: If I remember correctly, kh1 doesn't work in autoalc fields:  link might help, where other solutions are discussed. That would make a lot of sense seeing as the [[]] and kh1 are roll20 specific inside the chat log and math functions such as max(a,b) are JS functions usable in HTML
ceil((((@{Tactical_Command_total} + (0)) + abs(@{Tactical_Command_total} - (0))) / 2)/20) This works, it calculates the base, but for some reason the total still shows the formula

Edited 1484149392
NVM, I had a spelling mistake in the total :p Thanks for the link, it is a shame kh1 and kl1 do not work, much simpler