Data explanation, please! :)

Forum for plugin, effect and behavior programmers. Please use the Help & Support forum for help using Construct.

Post » Fri May 27, 2011 9:15 am

Hi everyone! I'm introducing myself to creating plugins, and I wanted to know how data values are returned to construct:

- Are strings returned as std::string or const char[]??
- How does the same apply to ints and floats, are they returned as normal floats/ints or should they be converted to something else?

thank u all in advance,

Francisco Dias (xD)
B
2
G
4
Posts: 17
Reputation: 1,084

Post » Fri May 27, 2011 1:00 pm

Strings are returned as const char* -- or, alternatively, CString -- as such:

[code:1cwi5gxp]return ret.ReturnString(VRuntime* pRuntime, const char* str);[/code:1cwi5gxp]
Ints and floats are returned just as they are in this manner

[code:1cwi5gxp]return ret = var;[/code:1cwi5gxp]
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817


Return to Construct engineering

Who is online

Users browsing this forum: No registered users and 0 guests