Troubleshooting Expression in PluginForum Home > Construct Classic > Construct Classic Discussion > Construct engineering
Topic: Troubleshooting Expression in Plugin
Posted: 23 Apr 2011 at 5:44pm
ok, i figured out the problem with the plugin. It might have just been a stupid error (not selecting "use expression") but I now successfully am using it.
Still having the problem with building in release mode. The runtime portion of the plugin is still getting an error as mentioned below.
p.s. Are there any instructions on debugging a plugin at runtime?
|Post Options Quote Reply Posted: 23 Apr 2011 at 4:25pm|
Think I might be narrowing down at least the runtime/release build error for GetInfo.
In internal.hpp the function is defined, but it has this config macro
And the function below is grayed out.
void WINAPI GetInfo(LPOINFO objectInfo)
objectInfo->MinimumVersion = MINIMUM_VERSION;
objectInfo->ideFlags = IDE_FLAGS;
Still not sure why it compiles fine under debug mode.
What does it mean in Visual Studio when there is a tiny little red circle with a minus sign sitting over the file name in the solution explorer? I'm using Visual Studio Pro 2010 and the project I coverted over was the MFC visual studio 2005 solution.
|Post Options Quote Reply Posted: 23 Apr 2011 at 1:01pm|
Thanks Lucid for the details. Unfortunately, everything still looks ok. On a separate note, I am getting an error when building for release mode (something about:
ConstructSDK.def : error LNK2001: unresolved external symbol GetInfo
Release/ConstructSDK.lib : fatal error LNK1120: 1 unresolved externals
The whole debug/runtime/release mode settings for output and linker confuse the heck out of me. I still get a warning about output path being different than linker path even though they all seem to be the same. It compiles fine under the "Debug" build option.
I zipped up the relevant source files if you have time to take a look:
I'm at a loss at this point how to debug this. Is there a way to be able to debug the execution of this plugin?
|Post Options Quote Reply Posted: 23 Apr 2011 at 7:43am|
it might have something to do with ACETABLE.cpp, if you paste the code I can tell your for sure if it does, just the part relating to that expression. If it is the problem, you can probably figure out from this: the ADDEXP relating to the get color, check number 3 below, but here's a breakdown on the others as well, I don't remember if the tutorial went in detail:
[code:3scnhft6]ADDEXP("My expression", "My category", "MyExpression", &ExtObject::eMyExpression, RETURN_INTEGER);[/code:3scnhft6][/size:3scnhft6]
[*:3scnhft6]"My expression" should be what you see when in the Add Expression dialogue in the editor
[*:3scnhft6]"My category" is the category it's under
[*:3scnhft6]"MyExpression" is what you actually have to type to use the expression, like "Angle" is what is here in the sprite plugin's sprite.angle expression. not case-sensitive. Checking if this is an empty string is probably where I'd first look, or if it was invalid with a space or something that wouldn't work in construct.
[*:3scnhft6] &ExtObject::eMyExpression is a pointer to the c++ function that actually returns the value at runtime for this expression
[*:3scnhft6] RETURN_INTEGER is the return type of the c++ function. RETURN_STRING, or RETURN_FLOAT are two more valid constants, if you right-click - go to deceleration in visual studio on any one of these, you can see a full list.[/*:m:3scnhft6][/list:o:3scnhft6]
if it's not this, it's probably not to do with the ace_table, but I'd suggest checking number 3 before moving on to other troubleshooting
|Post Options Quote Reply Posted: 23 Apr 2011 at 3:53am|
I just built-up the example plugin to get started learning how to write these. Everything compiled fine and I was able to load the plugin with Construct.
Then I followed all the steps in the tutorial to build the color gradient plugin with the setcolors actions and getcolor expression. The problem is when I select "Get Color" from the expression box nothing happens and the window just closes. Any ideas on what I'm doing wrong? I can't find any mistakes in the code.
|Forum Jump||Forum Permissions
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum