Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 06 Apr 2015 05:28 PM |
It's not working...I don't even know why.
--Server script game.Workspace.ServerEvent.OnServerEvent:connect(function() local Table = {["hi"] = {"lolol",1}, ["hi2"] = {"lolol2",2}} print(Table.Table[1]) end) --Local script game.Workspace.ServerEvent:FireServer() |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 06 Apr 2015 05:30 PM |
| Table.Table is nil you dip |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 06 Apr 2015 05:32 PM |
I changed it into
print(Table.hi[1])
still not printing. gaah.
FE is enabled btw. |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 06 Apr 2015 05:35 PM |
You made a dictionary
You have to find the value in it with the key, not the number like in an array.
Table["hi"] -->{"lolol",1} |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 06 Apr 2015 05:38 PM |
Even if I replace it with:
print("test")
it won't print it. I wonder what's going on. -.- |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
| |
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 06 Apr 2015 06:04 PM |
| I think I need to use remote function. -.- |
|
|
| Report Abuse |
|
|
| |
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 06 Apr 2015 06:16 PM |
| Still won't print. I even copied and paste roblox's example from roblox wiki (remote function) and it still won't work, I mean wtf is going on. |
|
|
| Report Abuse |
|
|
|
| 06 Apr 2015 06:23 PM |
| FE only works if you're a good scripter |
|
|
| Report Abuse |
|
|
instawin
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
|
| 06 Apr 2015 06:30 PM |
game.Workspace.ServerEvent.OnServerEvent:connect(function() local Tab = {["hi"] = {"lolol",1}, ["hi2"] = {"lolol2",2}} print(Tab.hi) end)
??
i haven't studied up on dictionaries, so i might be wrong |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 06 Apr 2015 06:32 PM |
| I can script mostly anything except trying to make your game work when filtering enabled is on. |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 06 Apr 2015 06:33 PM |
@insta
Even if I print anything like print("test") it won't print, especially with a remote function too! |
|
|
| Report Abuse |
|
|
instawin
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
|
| 06 Apr 2015 06:38 PM |
if you want it to work like an array, and so you won't be as confused with remote events:
--server script
local event = game.ReplicatedStorage:WaitForChild("RemoteEvent") -- you should put remote events inside of replicatedstorage
event.OnServerEvent:connect(function() local tab = {"hello mom!", 15, "goodbye world"} for index, value in pairs(tab) do print(value) end end)
-- local script
local event = game.ReplicatedStorage:WaitForChild("RemoteEvent")
event:FireServer()
also, just so you know, when firing to the server/client, you can provide parameters/tuples to fire as well
http://wiki.roblox.com/index.php?title=RemoteFunction_and_RemoteEvent_Tutorial |
|
|
| Report Abuse |
|
|