Calling GetScintilla() on non-scintilla control

0 favourites
  • 8 posts
From the Asset Store
Medeival & Viking War Horns Sounds / 22 Unique Calls / 2:40 minutes of audio
  • Problem Description

    When there's a plugin with a Condition with a parameter added with AddVariadicParams, an error pops up in Construct when editing condition parameters and clicking on "Add parameter" link. The error only pops up if Variadic parameter is not added the last. If it's the last parameter listed, everything is ok.

    When you click "Retry", the error pop up goes away and everything works. Even the condition works correctly. On runtime it sees all the Variadic parameters you pass.

    Attach a Capx

    Don't know what to attach since the problem is in a plugin mechanism

    Description of Capx

    Same here

    Steps to Reproduce Bug

    • Add to any plugin a Condition with AddVariadicParams("Name", "Description"); (which is not the last one)
    • Open Construct
    • Create a project
    • Create a condition
    • Click "Add parameter" link

    Observed Result

    Error pops up

    Expected Result

    Opens a new field for a parameter

    Affected Browsers

    • Chrome: (YES)

    Operating System and Service Pack

    Windows 10 Pro 64-bit

    Construct 2 Version ID

    248 (64-bit) checked

    Here's the content of the error pop up:

    ---------------------------

    Construct 2 Check failure

    ---------------------------

    Check failure! This is probably a bug:

    Calling GetScintilla() on non-scintilla control

    Condition: HasScintilla()

    File: Projects\Parameters.cpp

    Line: 3198

    Function: class CScintilla &__cdecl ParamControlSet::GetScintilla(int)

    Build: release 248 (64-bit) checked

    Component: Construct 2 IDE

    (Last Win32 error: 0)

    You are using a 'checked' release of Construct 2, intended for testing, which causes certain errors to be reported this way. Hit Ctrl+C to copy this messagebox - it's useful information for the developers, so please include it with any bug reports! Click 'Abort' to quit (unsaved data will be lost!),'Retry' to turn off messages for this session and continue, or 'Ignore' to continue normally.

    ---------------------------

    Abort Retry Ignore

    ---------------------------

  • valerypopoff I'm anxious to test your plugin.

    This error is probably because you put AddVariadicParams in the middle of the condition. In Construct 2 this operation can only be at the end.

    Cheers.

  • Holy cow! Is this documented anywhere?

    valerypopoff I'm anxious to test your plugin.

    This error is probably because you put AddVariadicParams in the middle of the condition. In Construct 2 this operation can only be at the end.

    Cheers.

  • It's subtle, but yes:

    https://www.scirra.com/manual/19/action ... xpressions

    ef_variadic_parameters

    Construct 2 will allow the expression to be used with additional 'any type' parameters past the end of those specified. Any parameters that are specified will still be required and type checked. If no parameters are specified, the expression can be used with any number of parameters at all.

  • Variadic parameters were implemented solely for the Function plugin. Anything the Function plugin doesn't need may be missing or buggy. I'd advise against using them if you can.

  • I guess in my case I can not.

    I made a plugin with the condition that works like this:

    It works perfectly in Construct 3 but this is a problem for Construct 2. What would you recommend?

    Variadic parameters were implemented solely for the Function plugin. Anything the Function plugin doesn't need may be missing or buggy. I'd advise against using them if you can.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The variadic parameter has to be at the end. It wasn't even designed to work in C3 with it not at the end, if it works it's only by accident!

  • Closing as won't fix since we won't be updating C2 to support this at this stage.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)