1

Syntax Error using SuccessCount

Oldwizard46 9/5/19 9:30 am
849
9/6/2019 3:01 am
I'm trying to do an IF/THEN/Else using command blocks. I've seen several examples on-line but when I try them I get a syntax error. My version is 1.12.0 (Windows 10). Here's a sample of the code I'm using:

testforblock ~ ~2 ~ command_block -1 {SuccessCount:0}

I get the following: Syntax Error: Unexpected "{": at "_block -1 >>{<<SuccessCou"

Basically trying to query a command block to see if it succeeded or not. If it succeeds do this if not do something else.

Thanks in advance for any help.
Posted by
Oldwizard46
Level 1 : New Miner
0

  Have something to say?

JoinSign in

1

HoboMaggot
09/06/2019 3:01 am
Level 55 : Grandmaster Blob
In bedrock edition, for testforblock, nbt is not supported.
You would be better off using a comparator for an if statement.
The only thing I can think of, for an if/else statement is a timer, which will be blocked by the comparator (with maybe piston) if it succeeds
1

Welcome