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: attempt to concatenate a nil value

Previous Thread :: Next Thread 
Lukekneenew is not online. Lukekneenew
Joined: 20 Oct 2009
Total Posts: 746
01 Jun 2013 07:07 PM
What does this mean? Also, tell me if you need the script I'm using.
Report Abuse
StrikerBOY606 is not online. StrikerBOY606
Joined: 25 Oct 2010
Total Posts: 747
01 Jun 2013 07:08 PM
Script please...
Report Abuse
Lukekneenew is not online. Lukekneenew
Joined: 20 Oct 2009
Total Posts: 746
01 Jun 2013 07:09 PM
local h = {}
local hn = {}
local wins = {}
local wm = game.Lighting.Winners:Clone()
wm.Parent = workspace
for i = 1,#p do
table.insert(h,#h+1,{p[i],p[i].KOsRound.Value})
table.insert(hn,#hn+1,p[i].KOsRound.Value)
end
table.sort(hn)
for i = 1,3 do
for j = 1,#h do
if h[j][2] == hn[i] then
wins[i] = h[j][1]
end
end
end
for i = 1,#wins do
if wins[i].Character and wins[i].Character.Humanoid then
wins[i].Character.Humanoid.WalkSpeed = 0
wins[i].Character:MoveTo(wm:findFirstChild("Plate"..i).Position)
end
end
for i = 1,#p do
local cs = game.Lighting.WinnerCutscene:Clone()
cs.Parent = p[i].Backpack
cs.Disabled = false
end
game.Workspace.Cheer:Play()
msg("Good job to "..list(wins).." for killing the most ballzes!",2.5) --error on dis line

I am not posting the whole thing cause it has 242 lines.
Report Abuse
TheAwesomenessDude is not online. TheAwesomenessDude
Joined: 17 Jul 2011
Total Posts: 11602
01 Jun 2013 07:10 PM
You are trying to do something like:

"Hi."..i.."How are you.", but the value you are trying to use (in this case 'i'), is non-existant.
Report Abuse
Lukekneenew is not online. Lukekneenew
Joined: 20 Oct 2009
Total Posts: 746
01 Jun 2013 07:11 PM
On my 3rd line, it creates wins though.
Report Abuse
Lukekneenew is not online. Lukekneenew
Joined: 20 Oct 2009
Total Posts: 746
01 Jun 2013 07:11 PM
Ohhh, my list function doesn't return anything. :D
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
01 Jun 2013 07:12 PM
What is list?
A function you made?
Report Abuse
TheAwesomenessDude is not online. TheAwesomenessDude
Joined: 17 Jul 2011
Total Posts: 11602
01 Jun 2013 07:12 PM
But it doesn't create 'list'.

I assume 'list' is nil?
Report Abuse
StrikerBOY606 is not online. StrikerBOY606
Joined: 25 Oct 2010
Total Posts: 747
01 Jun 2013 07:12 PM
Concatenation means

http://wiki.roblox.com/index.php/Concatenation

But I am not sure what the error is so its quite obvious it's something to do with the .. On that line but someone else might know.
Report Abuse
Lukekneenew is not online. Lukekneenew
Joined: 20 Oct 2009
Total Posts: 746
01 Jun 2013 07:20 PM
I fixed it. The function list didn't return anything, making it nil.
Report Abuse
morash is not online. morash
Joined: 22 May 2010
Total Posts: 5834
01 Jun 2013 07:47 PM
Concatenate is the connecting of two strings. nil is nothing. So you had tried to connect string to nothing which is why you got an error.
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
01 Jun 2013 07:57 PM
As morash said, you cannot concactenate a nil value. In fact, nil is the ONLY thing in Lua that you cannot concatenate. If you use tostring, however, you will be able to concatenate nil.
Report Abuse
morash is not online. morash
Joined: 22 May 2010
Total Posts: 5834
01 Jun 2013 08:00 PM
You can think of as sort of tying a string. You can tie it to anything but nothing. However if you were to turn nothing into something (by using tostring(nil)), you could tie your string to nothing
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