(Translated by https://www.hiragana.jp/)
Mô đun:Arguments và Mô đun:Arguments/sandbox: Khác biệt giữa các trang – Wikipedia tiếng Việt Bước tới nội dung

Mô đun:Arguments và Mô đun:Arguments/sandbox: Khác biệt giữa các trang

(Khác biệt giữa các trang)
Trang 1
Trang 2
Nội dung được xóa Nội dung được thêm vào
n Đã thay đổi mức khóa của “Mô đun:Arguments” ([Sửa đổi=Cấm mọi thành viên (trừ bảo quản viên)] (vô thời hạn) [Di chuyển=Cấm mọi thành viên (trừ bảo quản viên)] (vô thời hạn))
 
Trang mới: “-- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called…”
 
Dòng 167: Dòng 167:
if type(tidyVal) ~= 'function' then
if type(tidyVal) ~= 'function' then
error(
error(
"giá trị xấu được gán cho tùy chọn 'valueFunc'"
"bad value assigned to option 'valueFunc'"
.. '(chức năng mong đợi, '
.. '(function expected, got '
.. type(tidyVal)
.. type(tidyVal)
.. ')',
.. ')',
Dòng 270: Dòng 270:
if options.readOnly then
if options.readOnly then
error(
error(
'không thể ghi vào khóa bảng đối số "'
'could not write to argument table key "'
.. tostring(key)
.. tostring(key)
.. '"; bảng chỉ đọc',
.. '"; the table is read-only',
2
2
)
)
elseif options.noOverwrite and args[key] ~= nil then
elseif options.noOverwrite and args[key] ~= nil then
error(
error(
'không thể ghi vào khóa bảng đối số "'
'could not write to argument table key "'
.. tostring(key)
.. tostring(key)
.. '"; không được phép ghi đè các đối số hiện có',
.. '"; overwriting existing arguments is not permitted',
2
2
)
)