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

Replace removed function pipeworks.string_startswith #379

Conversation

Emojigit
Copy link
Contributor

This fixes the following error:

~/.minetest/mods/technic/technic_cnc/pipeworks.lua:45: attempt to call field 'string_startswith' (a nil value)
stack traceback:
	[C]: in function 'string_startswith'
	~/.minetest/mods/technic/technic_cnc/pipeworks.lua:45: in function 'pipeworks_on_receive_fields'
	~/.minetest/mods/technic/technic_cnc/api.lua:367: in function <~/.minetest/mods/technic/technic_cnc/api.lua:363>

This PR is ready for review.

@OgelGames OgelGames added Bug fix Compatibility Aims to improve compatibility with something. labels Sep 12, 2024
@OgelGames
Copy link
Contributor

Not sure how I missed that when I searched for it... 🤔

@BuckarooBanzay
Copy link
Member

do i understand this correctly: right now the current master branch crashes if you use the technic-cnc machine with pipeworks? 🤔

@S-S-X
Copy link
Member

S-S-X commented Sep 16, 2024

do i understand this correctly: right now the current master branch crashes if you use the technic-cnc machine with pipeworks?

Yes has to crash, pipeworks.string_startswith got removed here mt-mods/pipeworks@223c90e so it isn't available anymore.

Also it would be better this way anyway.

Copy link
Member

@S-S-X S-S-X left a comment

Choose a reason for hiding this comment

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

Looks good, should fix the issue.

Either of the suggestions can be added, mostly matter of taste. Approval either way. Also works as is without applying suggestions. All of these three options are just matter of taste.

@OgelGames OgelGames changed the title Fix attempt to call field 'string_startswith' Replace removed function pipeworks.string_startswith Sep 17, 2024
@Emojigit Emojigit requested a review from OgelGames September 18, 2024 10:39
@OgelGames OgelGames merged commit 0ab7291 into mt-mods:master Sep 18, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug fix Compatibility Aims to improve compatibility with something.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants