"Action list must end with a return statement" is the error message you will get if you define something like:
Code: Select all
Actor Test
{
States
{
Spawn:
TROO A 20
TNT1 A 0
{
if( randompick(0,1) == 1 )
{
A_Log("jumping");
return A_State("Skok");
}
A_Log("not jumping");
}
Stop
Skok:
VILE A 20
Stop
}
}
The problem is when you remove 'A_Log("not jumping");' then there is no error message and ZDoom starts up normally.
If you spawn this actor (again without A_Log("not jumping");) and the if condition is not met then ZDoom will crash.
"Action list must end with a return statement" is the error message you will get if you define something like:
[code]Actor Test
{
States
{
Spawn:
TROO A 20
TNT1 A 0
{
if( randompick(0,1) == 1 )
{
A_Log("jumping");
return A_State("Skok");
}
A_Log("not jumping");
}
Stop
Skok:
VILE A 20
Stop
}
}[/code]
The problem is when you remove 'A_Log("not jumping");' then there is no error message and ZDoom starts up normally.
If you spawn this actor (again without A_Log("not jumping");) and the if condition is not met then ZDoom will crash.