Jump to content

Am I just dumb? (conditionals in console files called via 'bat')


Recommended Posts

So trying to make myself some helper scripts to move things along to test what I'm doing...

if I type in the console 'if ActorID.getitemcount ObjRefID #>#; cgf "script.function" "value1" "value2"; endif' it functions correctly as expected.

I put it in a text file, because I have a stack of things I want to check and perform on that can't possibly fit on one line, and call it with 'bat filename' and it blows a "Mismatched if/else/endif block starting on line 1."

Never even get started on line 2, I'm dead in the water. Am I just dumb? Is there a workaround for this? Does invoking 'bat' break conditionals and that's just the way it is?

 

Thanks for reading.

Link to comment
Share on other sites

Try new lines instead of semicolon.

if ActorID.getitemcount ObjRefID #>#; cgf "script.function" "value1" "value2"; endif

to

if ActorID.getitemcount ObjRefID #>#
cgf "script.function" "value1" "value2"
endif

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...