Phellem
|
  |
| Joined: 04 Aug 2011 |
| Total Posts: 1984 |
|
|
| 14 Jan 2012 02:17 AM |
How could I do that? It showed an error when I typed that.
|
|
|
| Report Abuse |
|
|
| |
|
Phellem
|
  |
| Joined: 04 Aug 2011 |
| Total Posts: 1984 |
|
|
| 14 Jan 2012 02:22 AM |
@Dragon, I knew someone would post that. No, I'm trying to make something more complex than that.
game.Players.PlayerAdded:connect(function(plr) plr.Chatted:connected(function(chat) if string.find(chat == "print""...""") then Instance.new("Hint",workspace).Text = chat end end) end)
--[[Something similar to that concept]]-- |
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 14 Jan 2012 02:28 AM |
string.find(chat == "print""...""") You're using boolean value inside string.find?? |
|
|
| Report Abuse |
|
|
|
| 14 Jan 2012 02:31 AM |
| well yea I was going to say .. what do you exactly want this to do .. but then I just thought you will post back anyways :P |
|
|
| Report Abuse |
|
|
|
| 14 Jan 2012 02:32 AM |
| so you want to use the print() function to print in a hint ? |
|
|
| Report Abuse |
|
|
Phellem
|
  |
| Joined: 04 Aug 2011 |
| Total Posts: 1984 |
|
| |
|
|
| 14 Jan 2012 02:44 AM |
| working on it ..but by any chance do you know how to get the frist number only of string.find() ? |
|
|
| Report Abuse |
|
|
| |
|
|
| 14 Jan 2012 02:56 AM |
DONE!!!
if string.match(chat, "print") then
local x,w=string.find(chat,"print") local y,z=string.find(chat, ")") Hint.Text=chat:sub(x+5,z)
end
|
|
|
| Report Abuse |
|
|
|
| 14 Jan 2012 03:22 AM |
chat="print(script.Parent)" if string.match(chat, "print") then
local x,w=string.find(chat,"print") local y,z=string.find(chat, ")") print(chat:sub(x+6,z-1))
end
.... ops
it will only return the string inside the print() function ... |
|
|
| Report Abuse |
|
|
|
| 14 Jan 2012 03:44 AM |
chat="print(workspace.Parent)" if string.match(chat, "print") then
local y,w=string.find(chat,"print") local _,z=string.find(chat, ")") --local code=chat:sub(y+6,z-1) x = loadstring(chat:sub(y,z)) x() end
------ endless trys but I give up .. since I saw this .. :
http://www.roblox.com/Server-Error-Monitoring-System-item?id=65774258 |
|
|
| Report Abuse |
|
|