Application system stuck on last question

Hi all,

I am working on an application system for a cafe group. For now the info sent by players is sent to Discord in a private channel for staff members to read and approve or deny the application. The problem is I have to click an answer for the first question twice, then on the last question you get stuck with the following exception:

-   11:21:24.053 - ServerScriptService.ServerHandler2:27: bad argument #1 (table expected, got nil)

I did some debugging. The questions in the application are about 7, so I debugged (I debugged sooo much, just check the place I will be linking).

print(current_question, MAX_QUESTIONS)

I got

8 7

So somehow an extra question is being registered. I have since 3am trying to fix this problem. Worst part is, this code I am about to show you is only a rewrite of my first attempt. With the first attempt I still had issues.

Anyways here is the place since I feel it is too much code.

help_meh.rbxl (30,9 KB)

Do note a few things:

  • I have removed the webhook for privacy reasons; add your own to get the same issues.
  • I have a little check that whitelists developers and up from the group and up from being kicked; I have changed the group ID, also for privacy reasons.
  • The questions are slightly amended, but not to the point where the result will not the the same.

Edit: I originally got it to work but it would be using the answer of previous questions for the next questions. Now it doesn’t even let me get past the last question at all.

1 Like