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

Null Object Reference #16086

Open
calzinos opened this issue Dec 29, 2024 · 3 comments
Open

Null Object Reference #16086

calzinos opened this issue Dec 29, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@calzinos
Copy link

calzinos commented Dec 29, 2024

Describe your bug here.

Note skins don't change properly, this bug crashes the game

Command Prompt/Terminal logs (if existing)

states/PlayState.hx (line 2721)
states/PlayState.hx (line 2664)
openfl/events/EventDispatcher.hx (line 426)
openfl/display/DisplayObject.hx (line 1398)

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?

Lua

What is your build target?

Windows

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

No

@calzinos calzinos added the bug Something isn't working label Dec 29, 2024
@Shadow06735
Copy link

double check your noteskin xml, there might be something there thats causing a problem

@calzinos
Copy link
Author

calzinos commented Jan 4, 2025

function onEvent(name, value1, value2) 
	if name == 'noteskinchange' then
		if value2 == '' then
		if value1 == '' then
		-- do nothing lol
			for i = 0, getProperty('opponentStrums.length')-1 do
				setPropertyFromGroup('opponentStrums', i, 'texture', 'NOTE_assets');
			end
		else
			for i = 0, getProperty('opponentStrums.length')-1 do
				setPropertyFromGroup('opponentStrums', i, 'texture', value1);
			end
		end
		else
			if value1 == '' then
		-- do nothing lol
			for i = 0, getProperty('playerStrums.length')-1 do
				setPropertyFromGroup('playerStrums', i, 'texture', 'NOTE_assets');
			end
		else
			for i = 0, getProperty('playerStrums.length')-1 do
				setPropertyFromGroup('playerStrums', i, 'texture', value1);
			end
		end
		end
	end
end

Is this the noteskin xml you talked about?

@calzinos
Copy link
Author

calzinos commented Jan 4, 2025

function onEvent(name, value1, value2) 
	if name == 'pixelstrums' then
		if value1 == '' then
		-- do nothing lol
			for i = 0, getProperty('opponentStrums.length')-1 do
				setPropertyFromGroup('opponentStrums', i, 'texture', 'doki/NOTE_assets');
			end
			for i = 0, getProperty('playerStrums.length')-1 do
				setPropertyFromGroup('playerStrums', i, 'texture', 'NOTE_assets');
			end
			
			if getPropertyFromClass('ClientPrefs', 'globalAntialiasing') then
				for i = 0,3 do
					setPropertyFromGroup('playerStrums', i, 'antialiasing', true)
					setPropertyFromGroup('opponentStrums', i, 'antialiasing', true)
				end
			end
		else
			for i = 0, getProperty('opponentStrums.length')-1 do
				setPropertyFromGroup('opponentStrums', i, 'texture', 'PIXEL_NOTE_assets');
			end
			for i = 0, getProperty('playerStrums.length')-1 do
				setPropertyFromGroup('playerStrums', i, 'texture', 'PIXEL_NOTE_assets');
			end
			
			for i = 0,3 do
				setPropertyFromGroup('playerStrums', i, 'antialiasing', false)
				setPropertyFromGroup('opponentStrums', i, 'antialiasing', false)
			end
		end 
	end
end

```
I also found this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants