"Action list must end with a return statement" bugged

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
Fishytza
Posts: 793
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: They/Them
Contact:

"Action list must end with a return statement" bugged

Post by Fishytza »

"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.
User avatar
Major Cooke
Posts: 8212
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: "Action list must end with a return statement" bugged

Post by Major Cooke »

Does it crash for you if you did just TNT1 A 0 { } without anything inside of it? May be correlated.

It crashes for me.
User avatar
Fishytza
Posts: 793
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: They/Them
Contact:

Re: "Action list must end with a return statement" bugged

Post by Fishytza »

Yup, crashes for me too.
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Re: "Action list must end with a return statement" bugged

Post by randi »

Post Reply

Return to “Closed Bugs [GZDoom]”