Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

i get bad argument #1 to 'pairs' (table expected, got string) can someone help?

Asked by
sbot50 3
2 months ago

error: 22:37:51.965 - ServerScriptService.ServerMessageHandler:4: bad argument #1 to 'pairs' (table expected, got string)

code: !this is the code, what did i do wrong?

0
You're using parentheses, not table brackets. https://developer.roblox.com/articles/Table TheeDeathCaster 2208 — 2mo

1 answer

Log in to vote
1
Answered by 2 months ago

To define a table, you need to use these brackets "{ }" instead of parentheses "( )" since the parentheses are simply used to enclose a string or an operator set together.

Simply change this line

local allowed = ("sbot50")

to

 local allowed = {"sbot50"}
1
thanks, this works sbot50 3 — 2mo
Ad

Answer this question