Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expected expression, found: QUESTION in Shader Editor #42756

Closed
KoBeWi opened this issue Oct 12, 2020 · 4 comments · Fixed by #100289
Closed

Expected expression, found: QUESTION in Shader Editor #42756

KoBeWi opened this issue Oct 12, 2020 · 4 comments · Fixed by #100289

Comments

@KoBeWi
Copy link
Member

KoBeWi commented Oct 12, 2020

Godot version:

3.2.3

Steps to reproduce:

  1. Create a shader with this code
shader_type canvas_item;

void fragment() {
	COLOR = vec4(0, 0, 0, );
}

image

On master it says COMMA instead of QUESTION.

@KoBeWi KoBeWi added this to the 3.2 milestone Oct 12, 2020
@akien-mga akien-mga modified the milestones: 3.2, 3.3 Mar 17, 2021
@4x4x8
Copy link

4x4x8 commented May 8, 2021

Just edit vec4() to vec4(1,1,1,1)

Mini_tutorial:
vec4(1 - Red,
1 - G,reen,
1 - Blue,
1 - Alpha
)

And now we have vec4(1,1,1,1)

UPDATE1: Try the shader_type spatial;

Update2: don't, edit only vec4()

@akien-mga
Copy link
Member

On master it says COMMA instead of QUESTION.

Now it also says "found: COMMA" in 3.4 RC 1.

But that seems wrong too I guess, what it should find is a closing parenthesis where it expected an expression. The overall formulation of the error could maybe also be improved, it's a bit abrupt. CC @Chaosus

@akien-mga akien-mga modified the milestones: 3.3, 3.5 Oct 26, 2021
@Chaosus
Copy link
Member

Chaosus commented Oct 28, 2021

Just a syntax error is good to replace it? eg shadertoy have that:

image

@KoBeWi KoBeWi modified the milestones: 3.5, 3.x Apr 23, 2024
@Zylann
Copy link
Contributor

Zylann commented Dec 11, 2024

Still happening in v4.4.dev.custom_build [5eb29449d]

Image

@KoBeWi KoBeWi removed this from the 3.x milestone Dec 11, 2024
@AThousandShips AThousandShips added this to the 4.4 milestone Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants