blocker79
|
  |
| Joined: 31 Jan 2010 |
| Total Posts: 29 |
|
|
| 10 May 2014 11:41 PM |
| Is there any way to trigger this for testing? |
|
|
| Report Abuse |
|
|
|
| 10 May 2014 11:43 PM |
| What is that supposed to mean? You could create a function that you can call if you'd like then have the PlayerAdded Event call the function therefor allowing you to call the function yourself if that is what you mean. |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 10 May 2014 11:45 PM |
| Use loadstring for testing |
|
|
| Report Abuse |
|
|
|
| 10 May 2014 11:45 PM |
"Use loadstring for testing"
What are you talking about? |
|
|
| Report Abuse |
|
|
blocker79
|
  |
| Joined: 31 Jan 2010 |
| Total Posts: 29 |
|
|
| 10 May 2014 11:46 PM |
| Sorry I should have been MUCH more clear. I mean't triggering and passing an instance of a player a "test" player of sorts? |
|
|
| Report Abuse |
|
|
|
| 10 May 2014 11:46 PM |
| Does loadstring still work? I don't think it works in scripts, only in command bar. |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 10 May 2014 11:46 PM |
| What are you talking about?[x2] |
|
|
| Report Abuse |
|
|
| |
|
|
| 10 May 2014 11:49 PM |
So you mean
function playerAdded(Player) --code here end game.Players.PlayerAdded:connect(playerAdded)
playerAdded(PlayerInstance) |
|
|
| Report Abuse |
|
|
blocker79
|
  |
| Joined: 31 Jan 2010 |
| Total Posts: 29 |
|
|
| 10 May 2014 11:52 PM |
function newPlayer(player) print("player " .. player.Name .. " entered the game") if(DS ~= nil) then if(game:GetService("DataStoreService"):GetDataStore(DS, tostring("user_" .. player.userId)) == nil) then addtoCurrent(player) --else end end end
game.Players.PlayerAdded:connect(function(player) newPlayer(player) end)
this is a tiny snipit of code but the start of it and I need variables passed on by this to test the rest. I want to make a "test" player to pass through the code. |
|
|
| Report Abuse |
|
|
|
| 10 May 2014 11:53 PM |
function newPlayer(player) print("player " .. player.Name .. " entered the game") if(DS ~= nil) then if(game:GetService("DataStoreService"):GetDataStore(DS, tostring("user_" .. player.userId)) == nil) then addtoCurrent(player) --else end end end
Well you shouldn't create a new function to call a function it is unnecessary
game.Players.PlayerAdded:connect(player) newPlayer(player) end) |
|
|
| Report Abuse |
|
|
blocker79
|
  |
| Joined: 31 Jan 2010 |
| Total Posts: 29 |
|
|
| 10 May 2014 11:54 PM |
I know I still haven't cleaned up the code I've just been working though ideas.
|
|
|
| Report Abuse |
|
|