Typocrite
|
  |
| Joined: 28 Aug 2013 |
| Total Posts: 6856 |
|
|
| 04 Jul 2014 08:00 PM |
But the values are variables, not numbers.
Table = {variable1, variable2}
How to print variable1? |
|
|
| Report Abuse |
|
|
crouton04
|
  |
| Joined: 07 Jul 2010 |
| Total Posts: 4459 |
|
| |
|
crouton04
|
  |
| Joined: 07 Jul 2010 |
| Total Posts: 4459 |
|
|
| 04 Jul 2014 08:06 PM |
for i,v in pairs(Table) do print(i.."=="..v) end
or
for i = 1,#Table do print(Table[i]) end |
|
|
| Report Abuse |
|
|
Typocrite
|
  |
| Joined: 28 Aug 2013 |
| Total Posts: 6856 |
|
|
| 04 Jul 2014 08:06 PM |
I tried that. Doesn't work.
And I printed the variables beforehand so I am sure the variables are defined. |
|
|
| Report Abuse |
|
|
blox6137
|
  |
| Joined: 23 Nov 2008 |
| Total Posts: 1109 |
|
|
| 04 Jul 2014 08:12 PM |
wait wut?
print(variable1)
System32? Delete it. |
|
|
| Report Abuse |
|
|
crouton04
|
  |
| Joined: 07 Jul 2010 |
| Total Posts: 4459 |
|
| |
|
Typocrite
|
  |
| Joined: 28 Aug 2013 |
| Total Posts: 6856 |
|
|
| 04 Jul 2014 08:16 PM |
I figured it out- the issue was that I was trying to concatenate it
oesia = oigwge[1] print("ewiong"..oesia.."" )
this was what I was doing but apparently you can't do that. |
|
|
| Report Abuse |
|
|
blox6137
|
  |
| Joined: 23 Nov 2008 |
| Total Posts: 1109 |
|
|
| 04 Jul 2014 08:18 PM |
print(variable1 .. variable2) PS, what is oeasia, and oigwge and ewiong.
System32? Delete it. |
|
|
| Report Abuse |
|
|
Typocrite
|
  |
| Joined: 28 Aug 2013 |
| Total Posts: 6856 |
|
|
| 04 Jul 2014 08:21 PM |
| That was me typing gibberish just to demonstrate what I was doing |
|
|
| Report Abuse |
|
|
crouton04
|
  |
| Joined: 07 Jul 2010 |
| Total Posts: 4459 |
|
|
| 04 Jul 2014 08:36 PM |
| Typo, why the fk did use a put .."" at the end. You don't need that and to be honest, it jut pisses me off. |
|
|
| Report Abuse |
|
|
Typocrite
|
  |
| Joined: 28 Aug 2013 |
| Total Posts: 6856 |
|
|
| 04 Jul 2014 08:44 PM |
It's called string concatenation
this is where you pause a string and substitute a value in place so that the string is more dynamic
e.g.
"player 1's name is"..game.Workspace.Players.PlayerName..""
That example doesn't work but you get the idea |
|
|
| Report Abuse |
|
|
blox6137
|
  |
| Joined: 23 Nov 2008 |
| Total Posts: 1109 |
|
|
| 04 Jul 2014 09:44 PM |
You're not concatenating correctly bro.
System32? Delete it. |
|
|
| Report Abuse |
|
|
Vuva
|
  |
| Joined: 22 Jan 2010 |
| Total Posts: 1102 |
|
|
| 04 Jul 2014 09:56 PM |
No he is talking about the ending
"Hello ".."World!".."" is the same as: "Hello ".."World!" |
|
|
| Report Abuse |
|
|
crouton04
|
  |
| Joined: 07 Jul 2010 |
| Total Posts: 4459 |
|
|
| 05 Jul 2014 06:46 AM |
I just noticed what I typed lmao.
And Vuva is correct, thats what I meant. I have when people do the '..""' at the end. It's un-needed and just makes the script ugly qq Look at this code that my friend uses:
game.Players.PlayerAdded:connect(function(player) local magic = Instance.new("StringValue") random_magic = {"Fire Dragon Slayer", "Flame Dragon Magic", "Flame God Slayer", "Ice Devil Slayer Curse", "Iron Dragon Slayer", "Jade Dragon Magic", "Lightning Dragon Slayer", "Lightning God Slayer", "Mother Dragon Magic", "Poison Dragon Slayer", "Shadow Dragon Slayer", "Sky Dragon Slayer", "Sky God Slayer", "White Dragon Slayer"} local ele = math.random(1,#random_magic) local element = random_magic[ele] magic.Name = "Magic" magic.Value = element magic.Parent = player player:WaitForDataReady() player:SaveString(""..player.Magic.Value.."", player.Magic.Value) -- ewwww end) game.Players.PlayerAdded:connect(function(player) player:WaitForDataReady() print(player:LoadString(""..player.Magic.Value.."")) -- ewwwwwww end) |
|
|
| Report Abuse |
|
|