Jump to content

Recommended Posts

Posted

Hi, I have a question about MIST getavgpos script.

 

http://wiki.hoggit.us/view/GetAvgPos

 

I've done the script exactly same with the example in this manual, but no joy. It always shows mission script error.

 

Something is wrong with this manual?

Could you let me know how to do that script properly? I'm using MISTv3.5.

 

Thanks in advance.

Posted
Ian;2354586']Which error message are you getting?

 

It says

 

[string "trigger.action.smoke(mist.getAvgPos(mist.makeUnitTable({'[g]myG..."]:1: ')' expected near '<eof>'

 

I don't understand what this means...

Posted

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?

Posted
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.

  • Recently Browsing   0 members

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