Skip to content

Conversation

@Kipstz
Copy link
Contributor

@Kipstz Kipstz commented Dec 24, 2025

Change FS.CreateDirectory to return nil on success instead of a pair. On error, returns the error message string directly.

Closes #187

Change FS.CreateDirectory to return nil on success instead of a pair.
On error, returns the error message string directly.

Closes BeamMP#187
@WiserTixx
Copy link
Collaborator

This is a nice change, however it will most likely break a lot of widely used server plugins. I'm not sure if it's worth the trade off.

@Kipstz
Copy link
Contributor Author

Kipstz commented Jan 2, 2026

I see what you mean, but at some point we need to improve things. If it could cause problems, we should warn people for the future, but implement it anyway to make things cleaner.

@WiserTixx
Copy link
Collaborator

I suspect warning people will not be sufficient in this case. Most people don't update their server plugins (often) so this change would be harming a lot of casual players for a slight correction in the lua api design.
Unless both versions of the function can be implemented without conflict this PR will have to wait for the lua api rework.

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.

[Feature Request] Only return error message from FS.CreateDirectory()

2 participants