generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

What's the issue here?

Previous Thread :: Next Thread 
Eternalfireeater is not online. Eternalfireeater
Joined: 01 May 2011
Total Posts: 10027
28 Jan 2015 10:24 PM
-----
rawPA = game:GetService("HttpService"):GetAsync("http://pastebin.com/raw.php?i=pHWq2pYQ")
listPA = {}
for i in string.gmatch(rawPA,"%d+") do
table.insert(listPA, i)
end

if inTable(listPA, tostring(player.userId)) then
wait()
player:Kick()
end
-----
>bad argument #1 to 'pairs' (table expected, got nil)

??
Report Abuse
LucasLua is not online. LucasLua
Joined: 18 Jun 2008
Total Posts: 7386
28 Jan 2015 10:26 PM
I don't even see a pairs operator in your post. Is this the right code snippet?
Report Abuse
Eternalfireeater is not online. Eternalfireeater
Joined: 01 May 2011
Total Posts: 10027
28 Jan 2015 10:28 PM
There is an 'inTable' function defined earlier in the script.
It is perfectly functional and is not the source of the issue.
Report Abuse
LucasLua is not online. LucasLua
Joined: 18 Jun 2008
Total Posts: 7386
28 Jan 2015 10:36 PM
Well you have a grumpy pairs operator somewhere and it isn't in this snippet. Are you sure these are the lines causing the problem?
Report Abuse
Eternalfireeater is not online. Eternalfireeater
Joined: 01 May 2011
Total Posts: 10027
28 Jan 2015 10:41 PM
The error is on this specific line:
--
if inTable(listPA, tostring(player.userId)) then
--

The inTable function is as follows, though it is not causing the error.

-----
function inTable(tble, str, dictionary)
if dictionary == true then
for i,v in pairs(tble) do
if str == i then
return i
end
end
else
for i,v in pairs(tble) do
if str == v then
return v
end
end
end
end
-----
Report Abuse
Eternalfireeater is not online. Eternalfireeater
Joined: 01 May 2011
Total Posts: 10027
28 Jan 2015 11:00 PM
Anyone?
Report Abuse
Eternalfireeater is not online. Eternalfireeater
Joined: 01 May 2011
Total Posts: 10027
28 Jan 2015 11:19 PM
Bump
Report Abuse
Eternalfireeater is not online. Eternalfireeater
Joined: 01 May 2011
Total Posts: 10027
28 Jan 2015 11:40 PM
cnt?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
28 Jan 2015 11:49 PM
With what you gave us everything seems fine since listPA 'is' a table no matter what.
It seems that tble is nil, which shouldn't be possible.

Try adding a print(listPA) before calling the inTable function and a print(tble) inside. Or of course just put the full script on pastebin.
Report Abuse
Eternalfireeater is not online. Eternalfireeater
Joined: 01 May 2011
Total Posts: 10027
29 Jan 2015 06:48 PM
Found the issue. listPA and rawPA were defined within a co routine containing an endless loop. I accidentally put them in there while I was working fast at adding cool new features.
(:
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image