ShadowMario / FNF-PsychEngine

Engine originally used on Mind Games mod
Apache License 2.0
1.11k stars 2.18k forks source link

Null Object reference when trying to load dialogue before a song #10578

Closed TheJoetube closed 2 years ago

TheJoetube commented 2 years ago

Describe your bug here.

Whenever a song with dialogue tries to load in the story mode it crashes and gives this error.

Command Prompt/Terminal logs (if existing)

PlayState.hx (line 1548)
PlayState.hx (line 1320)
flixel/FlxGame.hx (line 637)
flixel/FlxGame.hx (line 724)
flixel/FlxGame.hx (line 677)
flixel/FlxGame.hx (line 551)
openfl/events/EventDispatcher.hx (line 402)
openfl/display/DisplayObject.hx (line 1399)

Uncaught Error: Null Object Reference
Please report this error to the GitHub page: https://github.com/ShadowMario/FNF-PsychEngine

> Crash Handler written by: sqirra-rng

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 added a custom week, dialogue, characters, songs, ect...

frantastic24 commented 2 years ago

Have you edited PlayState, if you have then show the lines mentioned in the error If not, what version are you using

TheJoetube commented 2 years ago

Have you edited PlayState, if you have then show the lines mentioned in the error If not, what version are you using

I am using 0.6.2

These are the lines it points too case 'chocolate': startDialogue(dialogueJson);

if(dialogueFile.dialogue.length > 0) { inCutscene = true; precacheList.set('dialogue', 'sound'); precacheList.set('dialogueClose', 'sound'); psychDialogue = new DialogueBoxPsych(dialogueFile, song); psychDialogue.scrollFactor.set();

BernardoGP4504 commented 2 years ago

Have you edited PlayState, if you have then show the lines mentioned in the error If not, what version are you using

I am using 0.6.2

These are the lines it points too case 'chocolate': startDialogue(dialogueJson);

if(dialogueFile.dialogue.length > 0) { inCutscene = true; precacheList.set('dialogue', 'sound'); precacheList.set('dialogueClose', 'sound'); psychDialogue = new DialogueBoxPsych(dialogueFile, song); psychDialogue.scrollFactor.set();

change startDialogue(dialogueJson) to startDialogue([dialoguefile]) [dialoguefile] is the dialogue file you're going to load

TheJoetube commented 2 years ago

change startDialogue(dialogueJson) to startDialogue([dialoguefile]) [dialoguefile] is the dialogue file you're going to load

when I do that it gives this error when compiling

source/PlayState.hx:1320: characters 21-33 : Unknown identifier : dialoguefile source/PlayState.hx:1320: characters 21-33 : ... For function argument 'dialogueFile'

BernardoGP4504 commented 2 years ago

I said change [dialogueFile] to the file name of the dialogue file you want it to load

Em seg, 19 de set de 2022 07:13, TheJoetube @.***> escreveu:

change startDialogue(dialogueJson) to startDialogue([dialoguefile]) [dialoguefile] is the dialogue file you're going to load

when I do that it gives this error when compiling

source/PlayState.hx:1320: characters 21-33 : Unknown identifier : dialoguefile source/PlayState.hx:1320: characters 21-33 : ... For function argument 'dialogueFile'

— Reply to this email directly, view it on GitHub https://github.com/ShadowMario/FNF-PsychEngine/issues/10578#issuecomment-1250826459, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYFVJYEH2HZIJGY54KLFLELV7A4DDANCNFSM6AAAAAAQPJ63MA . You are receiving this because you commented.Message ID: @.***>

TheJoetube commented 2 years ago

I said change [dialogueFile] to the file name of the dialogue file you want it to load

changed it to the file name but it gives more errors

BernardoGP4504 commented 2 years ago

So i think something is wrong with the dialogue file itself

Em ter, 20 de set de 2022 12:54, TheJoetube @.***> escreveu:

I said change [dialogueFile] to the file name of the dialogue file you want it to load

changed it to the file name but it gives more errors

— Reply to this email directly, view it on GitHub https://github.com/ShadowMario/FNF-PsychEngine/issues/10578#issuecomment-1252561751, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYFVJYD3FU643UMRN4BWAZDV7HM5BANCNFSM6AAAAAAQPJ63MA . You are receiving this because you commented.Message ID: @.***>

TheJoetube commented 2 years ago

So i think something is wrong with the dialogue file itself

There is nothing wrong with the dialogue file, since it works when I try the Lua solution to making dialogue play before a song. Also I should have clarified that it gives errors when compiling, not in game.

BernardoGP4504 commented 2 years ago

So then I think the variable dialogueFile is returning null or the game is not finding the file by the haxe method

Em ter, 20 de set de 2022 18:16, TheJoetube @.***> escreveu:

So i think something is wrong with the dialogue file itself

There is nothing wrong with the dialogue file, since it works when I try the Lua solution to making dialogue play before a song. Also I should have clarified that it gives errors when compiling, not in game.

— Reply to this email directly, view it on GitHub https://github.com/ShadowMario/FNF-PsychEngine/issues/10578#issuecomment-1252921690, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYFVJYG547NM6RYN4ZVJW23V7ISRXANCNFSM6AAAAAAQPJ63MA . You are receiving this because you commented.Message ID: @.***>

TheJoetube commented 2 years ago

So then I think the variable dialogueFile is returning null or the game is not finding the file by the haxe method

Is there any way to fix it then?

BernardoGP4504 commented 2 years ago

I don't know.

Em ter, 20 de set de 2022 19:06, TheJoetube @.***> escreveu:

So then I think the variable dialogueFile is returning null or the game is not finding the file by the haxe method

Is there any way to fix it then?

— Reply to this email directly, view it on GitHub https://github.com/ShadowMario/FNF-PsychEngine/issues/10578#issuecomment-1252963567, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYFVJYGITZ27S7FQEERXL4DV7IYMZANCNFSM6AAAAAAQPJ63MA . You are receiving this because you commented.Message ID: @.***>

DabbinDude316B commented 2 years ago

actually, the source version is broken. For now only lua works, I can confirm because I tried with source but to kept giving me a compiler error but with lua it works perfectly

TheJoetube commented 2 years ago

actually, the source version is broken. For now only lua works, I can confirm because I tried with source but to kept giving me a compiler error but with lua it works perfectly

Alright, guess I'll just use Lua until they fix it, thanks