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

fix: attempt to index a nil value (field 'options') #93

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Z3rio
Copy link

@Z3rio Z3rio commented Jun 7, 2024

This PR resolves issue: #71

image

Recreation

You can recreate this error by running the following code on your server-side:

local src = source
local ped = GetPlayerPed(src)

if ped then
	exports.pmms:startByNetworkId(NetworkGetNetworkIdFromEntity(ped), {
		url = "SOME URL",
		duration = 3,
		range = 5
	})
end

Solution

This is solved via actually passing down the options to the pmms:play event and sendMediaMessage function.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good so far. Working without issues.

@Freeetz
Copy link

Freeetz commented Nov 1, 2024

Could you send code ?

@Z3rio
Copy link
Author

Z3rio commented Nov 5, 2024

Could you send code ?

https://github.com/Z3rio/pmms/tree/master
You can already access it via this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants