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

NPC Script - Disconnecting when clicking 'next' when using cm.SendSimple(text) #267

Open
thebuilderbob1 opened this issue Aug 21, 2024 · 2 comments

Comments

@thebuilderbob1
Copy link

Describe the bug
The clients disconnects when using an NPC script that uses cm.sendSimple("whatever text") and clicking 'Next' in the NPC chat window.

To Reproduce
Steps to reproduce the behavior:

  1. Rename scripts/npc/commands.js to scripts/npc/commands_old.js
  2. Create new file scripts/npc/commands.js
  3. Edit new commands.js file to:
    function start() {
    cm.sendSimple("whatever text");
    }
  4. Start the server and login
  5. Type '@ commands' in the chat
  6. Click 'Next' on the NPC chat window
  7. Client disconnects

Expected behavior
I expected the NPC chat window to just close.

Screenshots
If applicable, add screenshots to help explain your problem.

@Arnuh
Copy link

Arnuh commented Aug 21, 2024

sendSimple is for menus which are #L1#yo#l. If you don't include a selection you'll crash. This is intended behavior by the client

sendNext is what you want

@thebuilderbob1
Copy link
Author

Thanks, I did play around with the other functions too, and they seemed to work fine. My intention was to say that I think the gameplay experience would be better if the behavior were handled more smoothly than a disconnect. It's probably not a major issue if, when making NPCs, one remembers to include a selection, but it would feel better for me, from a player perspective, that it goes smoothly. Do you think it's possible to do or are we limited by the client's behavior?

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

No branches or pull requests

2 participants