DreamFXLang
诊断码

诊断码

全部 DFXnnnn 诊断码:怎么读一条诊断、八个族各自属于流水线的哪一段,以及按码速查。

DreamFX 的每一条诊断都是一个 DFXnnnn,带着文件、行、列

DFX/Effects/NS_Hello.dfs(31,17): error DFX3003: Module 'GravityForce' has no input named 'Gravty'.
Did you mean 'Gravity'? Available inputs: Gravity, CoordinateSpace
日志分类LogDreamFX
严重级别error / warning / info —— 三级都真实使用
位置每个码都带文件、行、列
编辑器里失败的构建弹一条带 Open in VSCode 链接的 toast,直接跳到那一行那一列

首位数字就是抛出它的阶段。 这既是一条阅读线索,也是排错时该往哪里看的指路牌:

阶段意味着
DFX1xxx驱动与文件 I/O文件读不了,或者词法层面就断了
DFX2xxx词法与语法语法不对:括号、分号、关键字
DFX3xxx声明与文档结构语法对了,但声明的东西对不上真实资产
DFX4xxx值、类型与表达式等号右边有问题
DFX5xxx生成与资产写入写资产这一步出了问题,或者有意的降级提示
DFX6xxxNiagara 编译资产写出来了,Niagara 自己不满意
DFX7xxx溯源、漂移与 lint资产与源码失同步,或者 lint 觉得不对劲
DFX8xxx反编译器导出、Adopt、往返缺口

文档的一半是机器写的:严重级别、消息模板和抛出位置从插件源码里扫出来, gen-diagnostics.ps1 -Check 是防止它漂移的门。人写的那一半 —— 成因与修法 —— 只写一次。 见 ci.ps1 与门禁

排错的顺序

按码去查

本页下面的表,或者对应的族页面。码是稳定的:DFX3003 永远是同一个失败模式。

拿真实签名核对

dfx.ps1 schema <Module> -Stack <Stack> 打印构建看到的输入签名 —— 包括静态开关揭示出来的那些。名字的权威在资产上,不在记忆里。

还是不对,就看边界

能力边界 列出不覆盖的东西与 1.0.0 的已知问题。

按码速查

DFX1xxx — 驱动与文件 I/O

级别消息
DFX1000错误Could not read source file '%s'.
DFX1001错误Unterminated string literal.
DFX1002错误Unterminated block comment.
DFX1003错误Unexpected character '%c' (U+%04X).
DFX1004错误Unterminated raw block: missing '}'.
DFX1005错误Unterminated back-quoted name. A name must close on the same line.

DFX2xxx — 词法与语法

级别消息
DFX2000错误Unknown document type '%s'. Expected System, Emitter, Module or DynamicInput.
DFX2001错误Expected '{' to open a raw block but found '%s'.
DFX2002错误Expected a name but found %s.
DFX2003错误Expected a number but found '%s'.
DFX2004错误Expected a value but found %s.
DFX2005错误'#EndRegion' has no matching '#Region'.
DFX2006错误Unknown directive '#%s'. Expected Region or EndRegion.
DFX2007错误Expected a version after '@'.
DFX2008错误Module '%s' was given a positional argument. Module inputs must be written as 'Name = Value'.
DFX2010警告'#Region "%s"' was never closed with '#EndRegion'.
DFX2013错误'%s' is a system-scope stack and must be written at the top level of a .dfs, not inside an emit…
DFX2015错误'from' must be followed by a quoted path to a .dfe source file.
DFX2016错误(built at runtime)
DFX2018错误A Module or DynamicInput must declare a 'Body = { }' block.
DFX2019错误Header argument '%s' must be a quoted string.
DFX2020错误Unknown curve key attribute '%s'. Expected Interp, Tangent, Arrive or Leave.
DFX2021错误File declares '%s' but its extension is '%s'. Rename the file to '%s' or change the declaration.
DFX2022错误Unexpected '%s' after the end of the document. A DreamFX file declares exactly one top-level ob…
DFX2023错误'%s' is a module call, so it cannot be given a type. Types are written only on assignments.
DFX2024错误'disabled' can only prefix a module call, and '%s' is an assignment.
DFX2025错误Unknown OnEvent argument '%s'. Expected Source, Event, Mode, SpawnNumber, MaxEventsPerFrame, Up…
DFX2026错误Unknown Stage argument '%s'. Expected Iteration, DataInterface, NumIterations, ExecuteBehavior…

DFX3xxx — 声明与文档结构

级别消息
DFX3000错误(built at runtime)
DFX3001错误(built at runtime)
DFX3002错误Could not read the input schema of module '%s': %s
DFX3003错误Module '%s' has no input named '%s'.%s Available inputs: %s
DFX3004错误Unknown renderer type '%s'. Expected one of SpriteRenderer, MeshRenderer, RibbonRenderer, Light…
DFX3005错误Emitter '%s' is declared more than once. Emitter names are stable keys and must be unique.
DFX3006错误'%s' is neither an allowed inline function (%s) nor a dynamic input: %s
DFX3007错误Could not read the input schema of dynamic input '%s': %s
DFX3008错误Dynamic input '%s' has no input named '%s'. Available inputs: %s
DFX3009错误Dynamic input '%s' is pinned to version %s, which its asset does not offer. Available version(s…
DFX3010错误Property '%s': %s
DFX3020错误Unknown %s setting '%s'. Available settings: %s
DFX3021错误User parameter '%s' is declared more than once.
DFX3030错误A Module or DynamicInput must declare Settings.Usage -- it decides which stacks the module can…
DFX3031错误A DynamicInput must declare Settings.Output -- its return type cannot be inferred from the body.
DFX3032错误A DynamicInput's Usage must be DynamicInput, not '%s'.
DFX3033错误Input '%s' is declared more than once.
DFX3034错误Input '%s' is marked [StaticSwitch] but is a %s. A static switch must be a bool, an int or an e…
DFX3035错误Input '%s' is a [StaticSwitch], so its default must be a compile-time constant.
DFX3036错误The Body block is empty.
DFX3037错误(built at runtime)
DFX3038错误'%s' is not a stack a module can be placed in. Use one of: %s.
DFX3039错误A DynamicInput cannot return a data interface; its Output must be a value type.
DFX3040错误(built at runtime)
DFX3041错误'%s' could not be parsed; see the errors above.
DFX3042错误'%s' declares a %s, but 'from' needs an Emitter document.
DFX3043错误'%s' reads user parameters this system does not declare: %s. Add them to the Properties block.
DFX3044错误The default for input '%s' has to be a literal or an enum entry. A module input default is stor…
DFX3045错误'%s' is not a type a particle attribute can have.
DFX3046错误'%s' is not a particle attribute DreamFX knows the type of. Write the type at its first use in…
DFX3047错误A DynamicInput computes a value; it cannot write '%s'. Move the write into a Module.

DFX4xxx — 值、类型与表达式

级别消息
DFX4001错误Input '%s' expects %s, but a number was written.
DFX4002错误Expression for '%s': a vector literal must have 2 to 4 components.
DFX4003错误Input '%s' is an integer, but %s was written. Narrowing is not implicit -- write int(%s) if tru…
DFX4004错误Input '%s' has no resolvable Niagara type.
DFX4005错误Property '%s': component %d is not a number.
DFX4006错误Input '%s' is a %s, which has no entry named '%s'. Valid entries: %s
DFX4007错误Input '%s' expects %s. '%s' is neither a literal of that type nor a parameter reference -- para…
DFX4010错误Input '%s' is set more than once on dynamic input '%s'.
DFX4020错误Parameter '%s': 'Object' needs an inner type, e.g. Object<Texture>.
DFX4021错误Parameter '%s': no UObject class named '%s'. Object<> takes a class name such as Object<Texture…
DFX4022错误Cannot infer the type of '%s' from its value. A first assignment to a new attribute must use a…
DFX4023错误Property '%s': box() takes 6 numbers -- minX, minY, minZ, maxX, maxY, maxZ.
DFX4024错误Cannot type '%s = %s': the type of '%s' is not known here. Declare it in Properties, or assign…
DFX4025错误'%s' is not a valid assignment target. Parameter names are namespace-qualified, e.g. Particles.…
DFX4026错误'Bind %s -> %s': the target must be a qualified parameter -- either a namespace such as Particl…
DFX4027错误'%s' is %s, but '%s' is %s. Linking binds a parameter directly -- there is no conversion. Decla…
DFX4028错误Default for '%s' needs a declared type. A default has no module signature to infer one from, so…
DFX4029错误Default for '%s' must be a literal, an enum or another parameter. A dynamic input computes a va…
DFX4030错误The hlsl block for '%s' must be a single expression: no statements, no local variables, no retu…
DFX4031错误'%s' is not an allowed inline function. Allowed: %s. Anything else belongs in a .dfm dynamic in…
DFX4032错误'%s' in the expression for '%s' is not a parameter. Only namespace-qualified parameters (User.X…
DFX4033错误Builtin '%s' takes positional arguments, not named ones.
DFX4034错误Builtin '%s' takes %d argument(s), but %d were written.
DFX4035错误Expression for '%s' contains a value that has no HLSL form.
DFX4036错误The hlsl block for '%s' is empty.
DFX4037错误'%s' is %s; a curve { } literal only fits a curve data interface input.
DFX4038错误The curve for '%s' has no keys.
DFX4039错误Unknown curve interpolation '%s'. Expected Auto, Cubic, Linear or Constant.
DFX4040错误Parameter '%s': no asset at '%s'.
DFX4041错误Parameter '%s': '%s' is a %s, which is not a %s.
DFX4042错误Unknown curve tangent mode '%s'. Expected Auto, User, Break or None.
DFX4091错误Input '%s': dynamic inputs, hlsl blocks, curves and inline expressions are not available yet (p…

DFX5xxx — 生成与资产写入

级别消息
DFX5001错误Stack '%s' has no Niagara script usage mapping.
DFX5002警告This system declares no emitters, so it will produce nothing.
DFX5003提示'%s' is not declared in this source, so its existing modules are left as-is: %s
DFX5004提示No Material was set, so the engine default was applied: %s. Write 'Material = "...";' to choo…
DFX5030错误SavePackage failed for '%s'.
DFX5031错误Emitter '%s' declares more than one OnEvent block. Only one event handler per emitter is repres…
DFX5032错误Emitter '%s' declares two Stage blocks named '%s'. Stages are identified by name; rename one.
DFX5033错误Emitter '%s' declares Stage blocks but simulates on the CPU. Simulation stages are a GPU featur…
DFX5034错误Emitter '%s' uses 'as %s' on two module calls. Node names are unique per emitter; rename one.
DFX5093错误'MaterialParam' is reserved syntax and is not implemented in v1 (plan section 7).
DFX5097错误Only System documents can be generated right now; this file declares a %s.
DFX5098错误Data interface parameter '%s' takes its configuration as a quoted JSON object, the form the dec…
DFX5099提示[Group] and [SortPriority] are kept in source only: the external edit API's user variable struc…
DFX5100错误'%s' is a %s with no generated asset at '%s', and %s
DFX5101错误(built at runtime)
DFX5102提示Input '%s' is marked [StaticSwitch]. Tier-one generation (plan 3.3) lowers the whole Body to a…
DFX5103错误Package '%s' exists on disk but could not be loaded.
DFX5104错误Package '%s' exists but holds no Niagara script named '%s'. Refusing to overwrite it.
DFX5105错误Could not create package '%s'.
DFX5106错误Could not wire the module graph. The Niagara schema rejected a parameter map connection.
DFX5107错误'%s' no longer matches the module asset at '%s', and this build cannot regenerate it. Rebuild i…

DFX6xxx — Niagara 编译

级别消息
DFX6001错误(built at runtime)
DFX6002警告(built at runtime)
DFX6003错误(built at runtime)
DFX6004警告(built at runtime)
DFX6005错误Niagara compilation of '%s' did not succeed (status %s).
DFX6006错误Niagara could not compile the body of '%s': %s
DFX6007提示Nothing in this source writes that parameter, so there is no graph parameter for a default to s…
DFX6008错误'%s' finished its compile with stale scripts: %s. The compiled VM was not rebuilt from the grap…

DFX7xxx — 溯源、漂移与 lint

级别消息
DFX7001错误Asset '%s' carries no DreamFX provenance stamp: it was never generated from this source, or it…
DFX7002错误Asset '%s' is stale: it was generated from a different revision of this source. Run the DreamFX…
DFX7003警告Asset '%s' was generated by DreamFX %s; the current generator is %s. A rebuild is recommended.
DFX7004错误Asset '%s' does not exist: this source has never been built.
DFX7005错误(built at runtime)
DFX7101警告Emitter '%s' simulates on the GPU but declares no FixedBounds. GPU emitters cannot compute thei…
DFX7102警告Emitter '%s' spawns by rate ('%s') with no upper bound. Set AllocationMode = Fixed and PreAlloc…
DFX7103警告Emitter '%s' uses randomness ('%s') but does not set Determinism = true, so it will look differ…
DFX7104警告This renderer has no Material and DreamFX knows no default for its type, so it will not draw. S…

DFX8xxx — 反编译器

级别消息
DFX8000错误Cannot decompile a null system.
DFX8001错误Could not read emitters: %s
DFX8002警告Skipping emitter '%s': %s
DFX8003错误Cannot decompile a null emitter.
DFX8004错误Could not create a host system to read the emitter through: %s
DFX8005错误Could not copy emitter '%s' into a host system: %s
DFX8006错误Could not read emitter '%s': %s
DFX8010错误'%s' cannot be adopted: '%s' has no DreamFXLang form yet, so adopting would destroy it on the f…
DFX8011错误'%s' is already generated by an existing source, so a second one would silently overwrite it on…
DFX8012错误'%s' was adopted, but re-exporting the rebuilt asset does not reproduce this file. First differ…
DFX8013错误This file sits in the decompiled output directory but Name="%s" builds '%s', outside the '%s/…
DFX8014警告Emitter '%s' inherits from '%s'. The export flattens the inheritance: the merged stack is carri…
DFX8015警告Emitter '%s' carries %d event handler(s) this export cannot represent%s. The rebuilt emitter wi…
DFX8016警告Emitter '%s' carries %d simulation stage(s) this export cannot represent (custom stage class or…

本页目录