Jump to content

MIST getAvgPos how to?


horus0129

Recommended Posts

Lua is telling you that it encountered an error in line 1.

The error was

")" expected near <eof>

which means Lua was expecting to see a closing parenthesis but reached the "end of file" without finding it.

 

Count the parenthesis in the code example. Note that the number of open and close parens does not match.

 

Add a close parens to the end, problem solved :)

trigger.action.smoke[b]([/b]mist.getAvgPos(mist.makeUnitTable({'[g]myGroup'}), "Orange")[b][color="red"])[/color][/b]

 

EDIT: relevant xkcd (see what you did to that poor parser?

Link to comment
Share on other sites

Ian;2354624']Lua is telling you that it encountered an error in line 1.

The error was

 

which means Lua was expecting to see a closing parenthesis but reached the "end of file" without finding it.

 

Count the parenthesis in the code example. Note that the number of open and close parens does not match.

 

Add a close parens to the end, problem solved :)

trigger.action.smoke[b]([/b]mist.getAvgPos(mist.makeUnitTable({'[g]myGroup'}), "Orange")[b][color="red"])[/color][/b]

 

EDIT: relevant xkcd (see what you did to that poor parser?

 

 

Thanks Ian! Now I get it.

 

For someone who suffers from the same thing :

 

trigger.action.smoke(mist.getAvgPos(mist.makeUnitTable({'[g]myGroup'})), trigger.smokeColor.Green)

 

this works.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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