Engine Class
LogService
*เนื้อหานี้แปลโดยใช้ AI (เวอร์ชัน Beta) และอาจมีข้อผิดพลาด หากต้องการดูหน้านี้เป็นภาษาอังกฤษ ให้คลิกที่นี่
สรุป
วิธีการ
ClearOutput():() |
Error(message: string,context: Dictionary):() |
Info(message: string,context: Dictionary):() |
Log(messageType: Enum.MessageType,message: string,context: Dictionary):() |
Output(message: string,context: Dictionary):() |
Warn(message: string,context: Dictionary):() |
เหตุการณ์
MessageOut(message: string,messageType: Enum.MessageType,context: Dictionary):RBXScriptSignal |
เอกสารอ้างอิงเกี่ยวกับ API
วิธีการ
ClearOutput
LogService:ClearOutput():()
ส่งค่ากลับ
()
Error
พารามิเตอร์
| ค่าเริ่มต้น: "nil" |
ส่งค่ากลับ
()
Info
พารามิเตอร์
| ค่าเริ่มต้น: "nil" |
ส่งค่ากลับ
()
Log
พารามิเตอร์
| ค่าเริ่มต้น: "nil" |
ส่งค่ากลับ
()
Output
พารามิเตอร์
| ค่าเริ่มต้น: "nil" |
ส่งค่ากลับ
()
Warn
พารามิเตอร์
| ค่าเริ่มต้น: "nil" |
ส่งค่ากลับ
()
เหตุการณ์
MessageOut
LogService.MessageOut(
พารามิเตอร์
ตัวอย่างโค้ด
LogService.MessageOut
local LogService = game:GetService("LogService")
local messageLabel = Instance.new("Message")
messageLabel.Parent = workspace
local function onMessageOut(message, messageType)
messageLabel.Text = "ข้อความคือ " .. message .. " และประเภทคือ " .. tostring(messageType)
end
LogService.MessageOut:Connect(onMessageOut)