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 » Scripting Helpers
Home Search
 

Re: Odd error

Previous Thread :: Next Thread 
d0g1 is not online. d0g1
Joined: 19 Jul 2011
Total Posts: 23
27 Jun 2012 11:25 AM
Apparently, line 2 of this is wrong... How is it?

local pt = game.Players:GetChildren()
while not table.maxn(pt) > 5 do
game.Workspace.Message.Text = "Waiting for players - " .. 5-table.maxn(pt) .. " to go!"
wait(10)
end
saying


Workspace.Script:2: attempt to compare number with boolean
Script "Workspace.Script", Line 2
stack end
Report Abuse
thecaptain97 is not online. thecaptain97
Joined: 17 Jun 2010
Total Posts: 4987
27 Jun 2012 11:28 AM
table.maxn Aparently has a boolean [true/false] in it?
Report Abuse
d0g1 is not online. d0g1
Joined: 19 Jul 2011
Total Posts: 23
27 Jun 2012 11:30 AM
table.maxn (table)
Returns the largest positive numerical index (Not value) of the given table, or zero if the table has no positive numerical indices. (To do its job this function does a linear traversal of the whole table.)

Apparently not.
Report Abuse
thecaptain97 is not online. thecaptain97
Joined: 17 Jun 2010
Total Posts: 4987
27 Jun 2012 11:32 AM
Uhh.. then idk

Maybe try GetPlayers() instead of GetChildren() ? Besides that Idk
Report Abuse
d0g1 is not online. d0g1
Joined: 19 Jul 2011
Total Posts: 23
27 Jun 2012 11:34 AM
Nope :(
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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