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

Bug when i try to compile #783

Closed
DuckkFnF opened this issue Dec 3, 2024 · 18 comments
Closed

Bug when i try to compile #783

DuckkFnF opened this issue Dec 3, 2024 · 18 comments
Labels
bug Something isn't working inactive same as the other label, but just inactive in general

Comments

@DuckkFnF
Copy link

DuckkFnF commented Dec 3, 2024

Describe your bug here. If you are modding, try testing your bug in a clean version of the engine instead. Also, if you're using an older version of JSE, please try the latest version/action build. Also, be sure to check the pinned 'JS Engine: Known Issues' issue, to check if your issue hasn't already been found!

When i try compile js engine then this error shows up.

Command Prompt/Terminal/Crash logs (if existing)

source/MainMenuState.hx:304: characters 8-9 : Expected expression

Have you identified any steps to reproduce the bug? If so, please describe them below in as much detail as possible. Use images if possible.

No response

Are you modding a build from source or with Lua?

Source

What is your build target?

Windows

Did you edit anything in this build? If so, mention or summarize your changes.

Yes, i edited MainMenuState.hx

If you use 1.12.0 or earlier, did you have Optimized Chart Loading turned on?

None

Did you check for any similar issues to what you're reporting? Check, then come back here. If there is a similar issue, then do not report the issue, otherwise it will be marked as a duplicate.

Yes

@DuckkFnF DuckkFnF added the bug Something isn't working label Dec 3, 2024
@moxie-coder
Copy link
Collaborator

what did you even do though? You gotta show the edits you made

@moxie-coder moxie-coder added the needs more info There isn't enough information provided label Dec 3, 2024
@DuckkFnF
Copy link
Author

DuckkFnF commented Dec 3, 2024

what did you even do though? You gotta show the edits you made

Ok, so when i try do to lime test in cmd, then i get this error:
source/MainMenuState.hx:304: characters 8-9 : Expected expression
I edited the MainMenuState.hx in lines: 303-326.
My version is 1.39.0, not older versions.
Schermafbeelding 2024-12-03 202141
Schermafbeelding 2024-12-03 202208

						FlxFlicker.flicker(spr, 1, 0.06, false, false, function(flick:FlxFlicker)
						}
							var daChoice:String = optionShit[curSelected];

							switch (daChoice)
							{
								case 'play':
									PlayState.SONG = Song.loadFromJson('freeplay', 'freeplay');
									PlayState.isStoryMode = false;
									PlayState.storyDifficulty = 0;
									LoadingState.loadAndSwitchState(new PlayState());
								case 'freeplay':
									FlxG.switchState(FreeplayState.new);
								case 'gallery':
								    FlxG.switchState(GalleryState.new);
								case 'options':
									LoadingState.loadAndSwitchState(options.OptionsState.new);
								#end
							}
						});
					}
				};
			}
		}

This is all info that i have.
My English is not so good.

@StinkTheStinker
Copy link

you typed the "case: gallery" wrong

@StinkTheStinker
Copy link

no wait
nevermind

@StinkTheStinker
Copy link

check if there's a gallery state
it needs to be the exact name

@moxie-coder
Copy link
Collaborator

check if there's a gallery state it needs to be the exact name

that’s not it

@moxie-coder
Copy link
Collaborator

IMG_7679

remove that extra } in your code right there

@DuckkFnF
Copy link
Author

DuckkFnF commented Dec 4, 2024

remove that extra } in your code right there

Which } ?

@StinkTheStinker
Copy link

under the flicker line

@DuckkFnF
Copy link
Author

DuckkFnF commented Dec 4, 2024

now is my problem : source/MainMenuState.hx:304: characters 8-9 : Expected expression

@StinkTheStinker
Copy link

what

@DuckkFnF
Copy link
Author

DuckkFnF commented Dec 4, 2024

Schermafbeelding 2024-12-04 192946

@moxie-coder
Copy link
Collaborator

Schermafbeelding 2024-12-04 192946

you had it fixed, and you broke it again by adding that

@StinkTheStinker
Copy link

line of code
{
line of code again

@StinkTheStinker
Copy link

						FlxFlicker.flicker(spr, 1, 0.06, false, false, function(flick:FlxFlicker)
						{
							var daChoice:String = optionShit[curSelected];

							switch (daChoice)
							{
								case 'play':
									PlayState.SONG = Song.loadFromJson('freeplay', 'freeplay');
									PlayState.isStoryMode = false;
									PlayState.storyDifficulty = 0;
									LoadingState.loadAndSwitchState(new PlayState());
								case 'freeplay':
									FlxG.switchState(FreeplayState.new);
								case 'gallery':
								    FlxG.switchState(GalleryState.new);
								case 'options':
									LoadingState.loadAndSwitchState(options.OptionsState.new);
								#end
							}
						});
					}
				};
			}
		}

thats what it's meant to be

@DuckkFnF
Copy link
Author

DuckkFnF commented Dec 6, 2024

And now : source/MainMenuState.hx:320: characters 11-15 : Expected }
I have replace mine with yours code right here:

					FlxFlicker.flicker(spr, 1, 0.06, false, false, function(flick:FlxFlicker)
					{
						var daChoice:String = optionShit[curSelected];

						switch (daChoice)
						{
							case 'play':
								PlayState.SONG = Song.loadFromJson('freeplay', 'freeplay');
								PlayState.isStoryMode = false;
								PlayState.storyDifficulty = 0;
								LoadingState.loadAndSwitchState(new PlayState());
							case 'freeplay':
								FlxG.switchState(FreeplayState.new);
							case 'gallery':
							    FlxG.switchState(GalleryState.new);
							case 'options':
								LoadingState.loadAndSwitchState(options.OptionsState.new);
							#end
						}
					});
				}
			};
		}
	}

@moxie-coder
Copy link
Collaborator

					FlxFlicker.flicker(spr, 1, 0.06, false, false, function(flick:FlxFlicker)
					{
						var daChoice:String = optionShit[curSelected];

						switch (daChoice)
						{
							case 'play':
								PlayState.SONG = Song.loadFromJson('freeplay', 'freeplay');
								PlayState.isStoryMode = false;
								PlayState.storyDifficulty = 0;
								LoadingState.loadAndSwitchState(new PlayState());
							case 'freeplay':
								FlxG.switchState(FreeplayState.new);
							case 'gallery':
							    FlxG.switchState(GalleryState.new);
							case 'options':
								LoadingState.loadAndSwitchState(options.OptionsState.new);
							#end
						}
					});
				}
		        }
	        }

Just remove the extra }; like how I did

@DuckkFnF
Copy link
Author

DuckkFnF commented Dec 8, 2024

Didn't work...

@moxie-coder moxie-coder added inactive same as the other label, but just inactive in general and removed needs more info There isn't enough information provided labels Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working inactive same as the other label, but just inactive in general
Projects
None yet
Development

No branches or pull requests

3 participants