Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blueprint functions returning tuple for single return param, input arrays forced as out params #661

Open
SatansFather opened this issue Jan 30, 2019 · 1 comment

Comments

@SatansFather
Copy link

SatansFather commented Jan 30, 2019

Calling a blueprint function with a return value results in having to syntax it as follows:

newvar = uobject.somefunction()[0]

Even if there is only one return value, a tuple is returned.

I also ran into an issue with input arrays always being return as out parameters, so the previous function would need to be written differently to get the return value:

newvar = uobject.somefunction(['listelement1', 'listelement2'])[1]

Is there some way to disable this at the expense of allowing multiple return values? I'm okay with losing that functionality considering I'm using this plugin to allow users to create mods, and I think the awkward syntax caused by returning tuples will only lead to confusion among modders.

@dfb
Copy link
Contributor

dfb commented Feb 1, 2019

(I'm not a project dev, so take the following as unofficial)

If you don't mind applying a couple of patches, give #626 and #635 a try - with them you don't need to do the [0] syntax and they add support for multiple output parameters, which get passed back as additional return values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants