Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

elseif does not allow paranthesis like if does. #7

Closed
ScrewTheTrees opened this issue May 31, 2019 · 1 comment
Closed

elseif does not allow paranthesis like if does. #7

ScrewTheTrees opened this issue May 31, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@ScrewTheTrees
Copy link

ScrewTheTrees commented May 31, 2019

ceres does not seem to be able to parse () if its used in "elseif", as in "if".

This means that:

if (group.orderType == Ids.orderTypes.ORDER_GOLDMINE) then
elseif (group.orderType == Ids.orderTypes.ORDER_GOLDMINE) then
end

Will throw an error.
And:

if (group.orderType == Ids.orderTypes.ORDER_GOLDMINE) then
elseif group.orderType == Ids.orderTypes.ORDER_GOLDMINE then
end

Will run just fine.

the error message is akin to:

[�[31mERROR�[0m] -> Could not run map.
[�[31mERROR�[0m] -> Cause: Could not build map.
[�[31mERROR�[0m] -> Cause: Could not build the script.
[�[31mERROR�[0m] -> Cause: Parsing error in xxx\src\AIWorker.lua
[�[31mERROR�[0m] -> Cause: --> 47:63
|
47 | elseif (group.orderType == Ids.orderTypes.ORDER_GOLDMINE) then␍␊
| ^---
|
= expected StmtReturn, Stmt, Index, MethodCall, or Args

@ElusiveMori ElusiveMori added the bug Something isn't working label Dec 18, 2019
@ElusiveMori
Copy link
Collaborator

Should have been fixed with the new parser.

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants