Page 1 of 1

Everything is Undeclared!!??

PostPosted: Thu Oct 06, 2011 3:21 am
by EvanBlack
I changed one thing in my script and now suddenly everything is undeclared? Why?

Edit:
I moved all my variables and function prototypes to Initialize game script section.. it seems to work now... that was weird...

it broke itself again so I move ALL!!! my code into a single section..... it seems to work now.................... :x

Re: Everything is Undeclared!!??

PostPosted: Thu Oct 06, 2011 5:06 am
by skydereign
Okay, this does happen occasionally. What is happening is that a certain global script may decide not to be added, as if there was an error there. That means all variables and functions declared there are not. Usually all you have to do is go to that script and readd it. It has been added to the list of bugs, but so far I haven't been able to isolate it, as it still seems it happens randomly.

Re: Everything is Undeclared!!??

PostPosted: Thu Oct 06, 2011 6:13 am
by EvanBlack
Ok thanks. Yeah, I just, again, worked around it by putting all my code into one script section and separate it with comments. It works and is probably for the best even though it wasn't as nice as having it separated.

I don't know whats causing it but it keeps happening and it seems to be linked to declaring functions.

This is how I keep breaking it:

Have function prototype declared, function defined in same script, using function on actor. If I remove a variable from the defined function without changing the prototype and am using it on a actor then it removes the whole script section. I think I hit game mode too.

Example:
Script Section:

void function( int var1, int var2, int var3);

void function( int var1, int var2)
{
do stuff...
}

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

Actor:

function (var1, var2, var3);


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

Re: Everything is Undeclared!!??

PostPosted: Thu Oct 06, 2011 6:38 am
by skydereign
Though the problem may occur again. But, you do have a lower chance of it happening and you'll only have to add that one script if it does.