Goodis
|
  |
| Joined: 14 Jan 2010 |
| Total Posts: 253 |
|
|
| 22 Jul 2014 06:30 PM |
wat is this error? I have no second argument in my function help |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 22 Jul 2014 06:31 PM |
| Can you post part of the script and the line that is causing the error? |
|
|
| Report Abuse |
|
|
Goodis
|
  |
| Joined: 14 Jan 2010 |
| Total Posts: 253 |
|
|
| 22 Jul 2014 06:51 PM |
i get two errors, either one of the two commented below ------------------------------------------------------- user.Chatted:connect(function(m,chat) newChat=""; if(string.sub(m,1,3)==bet)then unfilter=function()--argument 2 missing or nil for i,v in next,words do chat=chat:gsub(i,v)end;end; userchat:chat(user.Character.Head,unfilter(m),'Blue')--attempt to index upvalue 'chat' end; end); |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 22 Jul 2014 06:56 PM |
user.Chatted:connect(function(m,chat)
The Chatted event only has 1 argument not 2 |
|
|
| Report Abuse |
|
|
Goodis
|
  |
| Joined: 14 Jan 2010 |
| Total Posts: 253 |
|
| |
|
Goodis
|
  |
| Joined: 14 Jan 2010 |
| Total Posts: 253 |
|
|
| 22 Jul 2014 06:59 PM |
| i removed it and put it onto the unfilter function, I still get Argument 2 missing or nil on userchat:chat(user.Character.Head,unfilter(m) ','Blue'); |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 22 Jul 2014 07:00 PM |
| http://wiki.roblox.com/index.php?title=RBX.lua.Chat_(Object) |
|
|
| Report Abuse |
|
|
Goodis
|
  |
| Joined: 14 Jan 2010 |
| Total Posts: 253 |
|
|
| 22 Jul 2014 07:14 PM |
ok so this is new script --------------------------- user.Chatted:connect(function(m) if(string.sub(m,1,3)==bet)then local chat; for i,v in next,words do chat=chat:gsub(i,v); if(chat~=nil)then userchat:chat(user.Character.Head,unfilter(m),'Blue') end; end; end; end); ---------------------------- Now I get this error:
attempt to index local 'chat' wt do !! |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 22 Jul 2014 07:18 PM |
You never told the script what userchat is
userchat:chat
script; wut????? |
|
|
| Report Abuse |
|
|
Goodis
|
  |
| Joined: 14 Jan 2010 |
| Total Posts: 253 |
|
|
| 22 Jul 2014 07:20 PM |
userchat = game:service'Chat';
|
|
|
| Report Abuse |
|
|
Goodis
|
  |
| Joined: 14 Jan 2010 |
| Total Posts: 253 |
|
| |
|
Goodis
|
  |
| Joined: 14 Jan 2010 |
| Total Posts: 253 |
|
| |
|