In my drawActor, I have the following
- Code: Select all
if (canKick == 1)
{
if (rand(10) <= 1)
{
canKick = 0;
Actor* ball = CreateActor("ball", "rolling", "(none)", "(none)", 0, 0, false);
ball->yvelocity = 5 + rand(10);
}
}
When I try to save, I get "Error line 6: Unexpected declaration canKick"
If I ignore the error, I cannot enter Game Mode, it complains again about the script.
If I move canKick = 0, like this, there is no problem
- Code: Select all
if (canKick == 1)
{
if (rand(10) <= 1)
{
Actor* ball = CreateActor("ball", "rolling", "(none)", "(none)", 0, 0, false);
canKick = 0;
ball->yvelocity = 5 + rand(10);
}
}
Looks like a parsing error in the script editor, maybe?