|
| 09 Nov 2013 01:09 AM |
I have a problem with global functions.
This is the one script that is receiving the global function
function Chat(msg,plr) coroutine.resume(coroutine.create(function() if string.sub(msg,1,5)=="-join" then print("Ran") response= _G.AddPlrOne(plr.Name) print("Ranzzzz") if responce=="ADDED" then m=Instance.new("Message",plr.PlayerGui) m.Text="Added to current game." game.Debris:AddItem(m,2) elseif responce=="LOCKED" then m=Instance.new("Message",plr.PlayerGui) m.Text="Server replied busy, not added." game.Debris:AddItem(m,4) elseif responce=="FULL" then m=Instance.new("Message",plr.PlayerGui) m.Text="Server is full of players." game.Debris:AddItem(m,4) else m=Instance.new("Message",plr.PlayerGui) m.Text="Undefined error: "..responce..".. Report to owner!" game.Debris:AddItem(m,4) end print("Ranzz") end end)) end
Here is the global function where it receives and responds.
paste bin . com/VfRdnNNK --Roblox somehow errors when trying to post this raw here.
Please don't tell me that I'm stupid, like the other thread did when I waited 3 days for a response. This IS a global function, and don't keep asking whats response?... Thanks. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
| 09 Nov 2013 11:56 PM |
Is this comparing a string with a player object?
if p==plrs[a] then
I kinda have to guess without the definition of plrs. |
|
|
| Report Abuse |
|
|
|
| 10 Nov 2013 12:36 AM |
No. When I call it, I only send the player name. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
MHebes
|
  |
| Joined: 04 Jan 2013 |
| Total Posts: 2278 |
|
|
| 10 Nov 2013 12:52 PM |
| C'mon man, you use pastebin and you don't indent your code OR highlight syntax? Oh well, looking at it now. |
|
|
| Report Abuse |
|
|
MHebes
|
  |
| Joined: 04 Jan 2013 |
| Total Posts: 2278 |
|
|
| 10 Nov 2013 12:59 PM |
| Line 21, Chat function, you spelled 'response' like 'responce'. Coroutines don't return errors, unfourtunately. |
|
|
| Report Abuse |
|
|
MHebes
|
  |
| Joined: 04 Jan 2013 |
| Total Posts: 2278 |
|
|
| 10 Nov 2013 12:59 PM |
| Same thing on line 7, same function. |
|
|
| Report Abuse |
|
|
|
| 10 Nov 2013 06:10 PM |
@MHebes Thank you. Just thank you.. |
|
|
| Report Abuse |
|
|