Function.Param(0) is allways empty

Get help using Construct 2

Post » Sat Feb 22, 2014 8:47 pm

Hello, iam running a function out of a group and this function doesn't get the passed parameters.
Iam calling the function standartly like this: Function Call "MissionCompleted" (1)
I have tryed different int, chars and it didn't help to solve the problem. I debuged it with a text plugin which is in the function. The text was >>Function.Param(0)<<. No matter what i tryed i got the 0 which means the parameter is empty.

Any suggestions for fixing this? Thank you for trying! :)
Last edited by bombak on Sat Feb 22, 2014 9:04 pm, edited 1 time in total.
B
9
S
2
G
1
Posts: 14
Reputation: 1,180

Post » Sat Feb 22, 2014 8:53 pm

This surely is a little error somewhere in the function call, could you show us the problem with a capx ?

I did an example not long ago about functions, if this can help you.
B
17
S
8
G
4
Posts: 473
Reputation: 6,191

Post » Sat Feb 22, 2014 9:15 pm

Holy moly, i fixed it after hours.. I just put the text on the top of the function and it worked.

The problem was a Wait 1.0 seconds action. When i put the output of Function.Param(0) after it, it is 0.

Thanks for your help.
B
9
S
2
G
1
Posts: 14
Reputation: 1,180

Post » Sat Feb 22, 2014 9:17 pm

The wait function is dangerous. As if forces the function to wait, the events go on and the "context" isn't kept. As the Params are in the context, you don't have access to them after...
B
17
S
8
G
4
Posts: 473
Reputation: 6,191


Return to How do I....?

Who is online

Users browsing this forum: Euduardo, Kin, mikehive, ratboy3, tinhofiel and 43 guests