|
| 12 Apr 2014 08:52 AM |
for i=1,#items do local n1 = items[i].Name if (p.Name == (n1 .. " Node")) then print('found') end end
_____________________________ No errors, the problem is with how I am trying to get the name n1 reads from a table, and it takes 1 of those items at a time. I am trying to check the name in the table, and add a word to the name. After all that, I check it with the name of the object in workspace.
My formatting for getting the name out of the table is off, and I need help getting it. |
|
|
| Report Abuse |
|
|
| |
|
UnAdmin
|
  |
| Joined: 10 Jul 2012 |
| Total Posts: 4706 |
|
|
| 12 Apr 2014 09:15 AM |
Items in the table have to be instances for this to work. If you're trying to get objects checked from workspace change items to Workspace:GetChildren()
for i,v in pairs(items) do if v.Name == v.." Node" then print'found' end end |
|
|
| Report Abuse |
|
|
UnAdmin
|
  |
| Joined: 10 Jul 2012 |
| Total Posts: 4706 |
|
|
| 12 Apr 2014 09:16 AM |
wait, why would you have if (p.Name == (n1 .. " Node")) then if n1 already has node on the end? you're asking this n1 = "something Node" if (p.Name == ("something Node" .. " Node")) then |
|
|
| Report Abuse |
|
|
|
| 12 Apr 2014 09:21 AM |
| I'm getting items from a config file in Replicated storage. Adding it to a table. Then i am checking everything in the table with what is in Workspace for an item that has same name (with appending the " Node"). |
|
|
| Report Abuse |
|
|
UnAdmin
|
  |
| Joined: 10 Jul 2012 |
| Total Posts: 4706 |
|
|
| 12 Apr 2014 09:26 AM |
for i,v in pairs(items) do for x,y in pairs(Workspace:GetChildren()) do if v.Name.." Node" == y.Name then print'found' end end end |
|
|
| Report Abuse |
|
|
| |
|