Scenario Editor not accepting braces asking for flower brackets

Here is the video attached below for the relation of bug. PFA

I’ve never used the scenario editor, but if it’s a C-like language that expects a function signature, you’re missing the parentheses before the curly braces. Also, there’s a typo in “research.” You might try:

void research() {
    // Your code here
}

Update: I just tried it and encountered the same issue when I failed to save the script correctly. After editing your script, press Ctrl+S to save it. The error messages will only reflect the current version of the script after it has been saved.

No, I tried both the suggestions I tried to save and tried to put parenthesis before flower brackets, both didn’t work here are the screenshots


When I try to insert your code, it complains about cAttributeForceEnable, which it can’t find. However, if I replace it with 0, the code checks out:

void research()
{
    xsEffectAmount(cModifyTech, 22, cAttrSetState, 0, 1);
}

Are you sure you pressed Ctrl+S while the focus was on the Input Box?
Maybe you defined cAttributeForceEnable somewhere else and it contains an error?

It still remains the same error for me in every scenario I created , here is the video related, PFA

It looks like the error might be more related to E#3 and Trigger14, since it appears when you select E#3. Unfortunately, it’s hard to fully understand the issue without more context or the ability to interact with it. You might consider asking for help in a different subforum, since this seems to be more of a scenario code problem rather than a bug in the game.

I deleted that event it still says the same error.

Thank you for sending me the scenario via PM. It’s now clear that the error isn’t related to the snippet you were editing in your videos; rather, the scenario code has other issues.

To resolve the error:

  • Delete all scripts marked in red from any triggers that are also marked in red.
  • Save the scenario under a different name.
  • Reload this save to ensure all indicators turn green.

Next, review and restore the deleted scripts one by one. They seem to have encoding issues - as evidenced by the many box characters - which must be fixed before the scenario can run correctly.

I highly recommend working with a functional codebase and gradually building up to your final scenario.

1 Like

yeah, thank you its working.

Glad I could help! I noticed that the box characters aren’t the real issue - they’re just not very appealing. The actual problem is an extra ‘}’ at the end of Trigger 0 > E#1.

1 Like

yeah, I corrected it all started working