Minecraft Wiki

Minecraft Wiki ไม่ถือว่าเป็นวิกิอย่างเป็นทางการของ Microsoft อีกต่อไป ดังนั้นจึงมีการเปลี่ยนแปลงหลายประการเกิดขึ้น ซึ่งรวมไปถึงโลโก้ของวิกิด้วย โปรดอ่านที่ประกาศนี้สำหรับข้อมูลเพิ่มเติม

READ MORE

Minecraft Wiki
Advertisement

{{{1}}}

[ดู | แก้ไข | ประวัติ | ล้างแคช]คู่มือการใช้งาน


The template returns a state of error, and optionally an error-message text in red (visible for the user).

Usage[]

The parameter |1= can be set to the error to display when using this template.

  • {{error|An exemplary error}}แม่แบบ:Error
  • Compare, used in a Parser Function: {{#expr:Foo}}ข้อผิดพลาดนิพจน์: "foo" เป็นคำที่ไม่รู้จัก

If |1= is unset, no error will be displayed, although it still can be detected by {{#iferror:}}

  • {{error}}แม่แบบ:Error

#iferror[]

The error displayed is detected by the parser function {{#iferror:}}.

  • {{#iferror: {{error|Foo}} | {{c|yes}} | {{c|no}} }} No
  • {{#iferror: {{error}} | {{c|yes}} | {{c|no}} }} No

Tag option[]

The tag to contain the error message can be given through the |tag= parameter, but it will only accept span, div, p, and strong, since those are the only tags recognized by the {{#iferror:}} parser function. It defaults to strong, the tag generated by most parsers, e.g. by {{#expr:}}.

Code Result
ABC {{error|An exemplary error demo no tag (default)}} XYZ ABC แม่แบบ:Error XYZ
ABC {{error|An exemplary error demo span|tag=span}} XYZ ABC แม่แบบ:Error XYZ
ABC {{error|An exemplary error demo div|tag=div}} XYZ ABC แม่แบบ:Error XYZ
ABC {{error|An exemplary error demo p|tag=p}} XYZ ABC แม่แบบ:Error XYZ
ABC {{error|An exemplary error demo strong|tag=strong}} XYZ ABC แม่แบบ:Error XYZ

See also[]

[ดู | แก้ไข | ประวัติ | ล้างแคช]คู่มือการใช้งานที่ปรากฏด้านบนนี้ดึงมาจาก แม่แบบ:ผิดพลาด/doc.
Advertisement