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" Report: Small harmless typos I found randomly #4083

Open
3 tasks done
Starexify opened this issue Feb 2, 2025 · 10 comments
Open
3 tasks done

"Bug" Report: Small harmless typos I found randomly #4083

Starexify opened this issue Feb 2, 2025 · 10 comments
Labels
status: pending pull request Dependent on a pull request that is currently awaiting review. type: chore Involves minor adjustments that do not make functional changes.

Comments

@Starexify
Copy link

Starexify commented Feb 2, 2025

Issue Checklist

  • I have read the pinned Issues Guide
  • I have checked the Issues/Discussions pages to see if my issue has already been reported
  • I have properly named my issue

Platform

Windows

Version

0.5.3

Description (include any images, videos, errors, or crash logs)

Not a bug but I found some syntax errors:

  1. ;'s at the end of functions/conditions





    public function onScriptEvent(event:ScriptEvent):Void {};
    public function onCreate(event:ScriptEvent):Void {};
    public function onDestroy(event:ScriptEvent):Void {};
    public function onUpdate(event:UpdateScriptEvent):Void {};


    public function onScriptEvent(event:ScriptEvent):Void {};
    public function onCreate(event:ScriptEvent):Void {};
    public function onDestroy(event:ScriptEvent):Void {};
    public function onUpdate(event:UpdateScriptEvent):Void {};

    public function onPause(event:PauseScriptEvent):Void {};
    public function onResume(event:ScriptEvent):Void {};
    public function onSongLoaded(event:SongLoadScriptEvent):Void {};
    public function onSongStart(event:ScriptEvent):Void {};
    public function onSongEnd(event:ScriptEvent):Void {};
    public function onGameOver(event:ScriptEvent):Void {};
    public function onSongRetry(event:ScriptEvent):Void {};
    public function onNoteIncoming(event:NoteScriptEvent) {}
    public function onNoteHit(event:HitNoteScriptEvent) {}
    public function onNoteMiss(event:NoteScriptEvent):Void {};
    public function onNoteGhostMiss(event:GhostMissNoteScriptEvent):Void {};
    public function onSongEvent(event:SongEventScriptEvent):Void {};
    public function onStepHit(event:SongTimeScriptEvent):Void {};
    public function onBeatHit(event:SongTimeScriptEvent):Void {};
    public function onCountdownStart(event:CountdownScriptEvent):Void {};
    public function onCountdownStep(event:CountdownScriptEvent):Void {};
    public function onCountdownEnd(event:CountdownScriptEvent):Void {};
    public function onScriptEvent(event:ScriptEvent):Void {};
    public function onCreate(event:ScriptEvent):Void {};
    public function onDestroy(event:ScriptEvent):Void {};
    public function onUpdate(event:UpdateScriptEvent):Void {};

  2. Duplicate Imports:
    FunkinSound:

    import funkin.audio.FunkinSound;
    import funkin.ui.mainmenu.MainMenuState;
    import funkin.ui.MusicBeatState;
    import funkin.graphics.shaders.HSVShader;
    import funkin.util.WindowUtil;
    import funkin.audio.FunkinSound;

  3. , at the end of a list/array etc

    targetSongId: currentSong.id,

@Starexify Starexify added status: pending triage Awaiting review. type: minor bug Involves a minor bug or issue. labels Feb 2, 2025
@AbnormalPoof
Copy link
Collaborator

These are not syntax errors. The game wouldn't compile if they were.

@AbnormalPoof AbnormalPoof added status: needs clarification Requires more info from the author. and removed status: pending triage Awaiting review. labels Feb 3, 2025
@Hundrec
Copy link
Collaborator

Hundrec commented Feb 3, 2025

What do you mean by syntax errors? Are the semicolons not necessary?

@Lasercar
Copy link
Contributor

Lasercar commented Feb 3, 2025

What do you mean by syntax errors? Are the semicolons not necessary?

https://en.wikipedia.org/wiki/Syntax_error

It's only a syntax error when it'd result in the code not being able to compile. These are all harmless typos.
The duplicate import in the options state could be fixed though.

@Hundrec
Copy link
Collaborator

Hundrec commented Feb 3, 2025

I know what a syntax error is. I just don't think these are syntax errors for the reason AbnormalPoof stated.

@Starexify Starexify changed the title "Bug" Report: Small syntax errors I found randomly "Bug" Report: Small harmless typos I found randomly Feb 3, 2025
@Hundrec
Copy link
Collaborator

Hundrec commented Feb 3, 2025

As a non-coder, I still don't understand how these are typos. Don't lines of code usually end with semicolons?
The only reason I'd think to remove these would be if they differed from the general codestyle.

@Starexify
Copy link
Author

Starexify commented Feb 3, 2025

As a non-coder, I still don't understand how these are typos. Don't lines of code usually end with semicolons?
The only reason I'd think to remove these would be if they differed from the general codestyle.

So, normally conditions and functions don't have ; at the end, I think haxe doesn't take those in consideration when compiling (not sure, + could be the same with the public statement in methods but wont complain in the fnf code tho it would remove some size from the src)

@Hundrec
Copy link
Collaborator

Hundrec commented Feb 3, 2025

Thanks for clarifying!
If you can compile the game without these semicolons, then you should create a PR for this and the duplicate import.

@Hundrec Hundrec added status: pending triage Awaiting review. and removed status: needs clarification Requires more info from the author. labels Feb 3, 2025
@Starexify
Copy link
Author

Thanks for clarifying! If you can compile the game without these semicolons, then you should create a PR for this and the duplicate import.

Sorry for this but how do I create a PR with these fixes 🤔

@Hundrec
Copy link
Collaborator

Hundrec commented Feb 3, 2025

You should create your own fork of Funkin, edit the semicolons and import out of the file, commit the changes, then click on the "Create/open pull request" button that appears on the pull requests page.

@Starexify
Copy link
Author

Alright thanks I opened a PR #4092 and will update if I found anything else through the files 👍

@Hundrec Hundrec added type: chore Involves minor adjustments that do not make functional changes. status: pending pull request Dependent on a pull request that is currently awaiting review. and removed type: minor bug Involves a minor bug or issue. status: pending triage Awaiting review. labels Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: pending pull request Dependent on a pull request that is currently awaiting review. type: chore Involves minor adjustments that do not make functional changes.
Projects
None yet
Development

No branches or pull requests

4 participants