kayler-renslow / arma-intellij-plugin

A plugin for Intellij IDEA that allows for syntactical analysis, code inspections, and other nifty features for the SQF scripting language in Arma 3.
MIT License
41 stars 10 forks source link

Weird errors #43

Closed AlexGnatko closed 7 years ago

AlexGnatko commented 7 years ago

Plugin Version: latest from IntelliJ Summary: Working code gets flagged as errors Detail: This line: for [{_index = 0}, {_index < 9}, {_index = _index + 1}] do displays this error (underlines what's after _index = 0: There is an error. ';' or Command expected, got '}'. I think the code used to work perfectly, and as far as I know, you don't have to insert semicolons in SQF right before the closing } bracket (the last statement in the block). Though by adding semicolons before each closing bracket I can remove the error. Maybe make it a warning, not an error?

Also, this line: call compile preprocessfile "server\server_utils.sqf"; gives an error before I wrap the string in (). This also happens in some other cases.

Ragebone commented 7 years ago

Hi Alex,

for [{_index = 0;}, {_index < 9;}, {_index = _index + 1;}] do{ Semicolons, just semicolons. The plugin expects a ";" after each "argument"*. Even at the end of scopes. and call compile preprocessFile "server\server_utils.sqf"; needs to have commands written in camelCase, this will change in a future update. You are right with that SQF and ArmA just don't care about those things, but the plugin does. And there are reasons for it!

That's also mentionend in the wiki and readme file. But i made the same mistake. 😄