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
 

Re: Table Error

Previous Thread :: Next Thread 
Jezz11 is not online. Jezz11
Joined: 30 Jan 2009
Total Posts: 19
11 Apr 2015 07:18 PM
I am trying to make a simple script to check how many players are in the game, but it keeps giving me an error at the point where I open a table saying "Expected identifier, got ')'"

Any tips?
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
11 Apr 2015 07:22 PM
We need to see the portion of the code.
Report Abuse
Jezz11 is not online. Jezz11
Joined: 30 Jan 2009
Total Posts: 19
11 Apr 2015 07:24 PM
while true do -- wait for 2 players
wait(3)
people = ()
for _, player in pairs(game.Players:GetPlayers()) do
if player and player.Character then
local humanoid = player.Character:WaitForChild("Humanoid")
if humanoid and humanoid.Health > 0 then
table.insert(people, player)
end

end
end
if #people >= 2 then
break
end
end
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
11 Apr 2015 07:25 PM
while true do -- wait for 2 players
wait(3)
people = {}
for _, player in pairs(game.Players:GetPlayers()) do
if player and player.Character then
local humanoid = player.Character:WaitForChild("Humanoid")
if humanoid and humanoid.Health > 0 then
table.insert(people, player)
end

end
end
if #people >= 2 then
break
end
end

try that
Report Abuse
Jezz11 is not online. Jezz11
Joined: 30 Jan 2009
Total Posts: 19
11 Apr 2015 07:27 PM
That worked perfectly! Thank you!
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
11 Apr 2015 07:29 PM
no problemo

[just in case]: the problem is that u used () instead {}
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