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

error codes for gsh commands #28

Open
phyver opened this issue May 27, 2021 · 1 comment
Open

error codes for gsh commands #28

phyver opened this issue May 27, 2021 · 1 comment
Labels
enhancement GameShell relative to GameShell code

Comments

@phyver
Copy link
Owner

phyver commented May 27, 2021

It would be nice if gsh commands returned a value: 0 for OK, or some error code.

The problem is that gsh check will also do a clean and an init.

One possibility would be to have different function used different bits in the return value:

  • lsb for check
  • bit 1 for init
  • bit 2 for test
  • bit 3 for static
  • bit 4 for goal
  • bit 5 for treasure
  • bit 6 for treasure-msg

We'll have one last bit to use for something else!

@phyver phyver added the GameShell relative to GameShell code label May 28, 2021
@phyver
Copy link
Owner Author

phyver commented Jun 7, 2021

Simpler solution:

  • no return value for gsh static and gsh init (if init returns true, the mission is skipped anyway).
  • 0/1 return value for gsh check and gsh test
  • 0/1 return value for gsh goal

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

No branches or pull requests

1 participant