fix(ux): /help string drift — 9 commands had wrong syntax or wrong gate#291
Merged
Conversation
Audit of SendChatHelp + SendChatHelpDetail (ServerNet.bb:31-109) against
the actual Case dispatch in UpdateNetwork found 9 in-game help strings
that misdescribed the command. Players seeing /help would learn the
wrong syntax, type something the parser silently rejects, and lose
several seconds trying to figure out what's wrong.
Defects fixed:
/warp -- moved from non-DM "Info" line to DM-only line (gate at
ServerNet.bb:531 requires Account\IsDM). Syntax was "<area>[,<x>,<y>,
<z>]" implying coordinates; handler at :534 reads Split$(Params$, 2,
",") as Instance (area-instance number), then walks PortalName$[i] for
the first defined portal. There is no x/y/z plumbing on this path.
New: "/warp <area>[,<instance>] -- warp self to area's first portal".
/warpother -- same syntax fix ("<instance>" not "<x>,<y>,<z>").
/yell -- description said "shout to your entire area" but the handler
at :408-414 walks the FirstOnlinePlayer engine-wide chain. New:
"shout to every online player on the server".
/xp, /gold, /setattribute, /setattributemax -- help advertised a
"<player>" first arg but every handler calls Give*/UpdateAttribute*
on AI (self). The "<player>" slot was never read.
/ability -- help said "<player>,<ability>" but handler at :577 splits
into Name + Level and calls AddSpell(AI, ...). Actual syntax is
"<ability>,<level>" granting to self.
/give -- help said "<player>,<item>[,<amount>]" but handler at :588
takes Upper$(Params$) and matches the whole string against an item
Name. There is no <player> arg, no <amount> arg, the item goes to AI.
New: "/give <item> -- spawn item into own inventory".
/gm -- help said "broadcast as GM to all players" but the handler at
:422-427 only sends to other DMs (re-checks A2\Account.IsDM). Tightened
to "broadcast as GM to all DMs".
Block-comment added above the DM-only `If` documenting the self-target
invariant for future contributors: "All grant commands target self --
the handlers in this file uniformly call GiveXP/AddSpell/etc. on AI,
never on a Params-named player. /warpother is the sole exception."
Also corrected /warp and /warpother entries in
docs/protocol/packets/P_ChatMessage.md (catalogue I just merged in #290
had the same `<x>,<z>` mistake, copied from the broken help text).
Compile-verified clean across Server/Client/GUE/Project Manager.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Reviewer caught that the block comment added in the previous commit was factually wrong: I wrote "/warpother is the sole exception that takes a target," but /kick at ServerNet.bb:201-215 also takes a <player> arg via FindActorInstanceFromName(Params$) and kicks that other player. Updated comment to list both exceptions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Audit of
SendChatHelp+SendChatHelpDetail(ServerNet.bb:31-109) against the actualCasedispatch inUpdateNetworkfound 9 in-game help strings that misdescribed their command. Players running/help <cmd>would learn the wrong syntax, type something the parser silently rejects, and lose several seconds figuring out what's wrong.The recon trigger was PR #290's reviewer, who spotted that
/script <name>[,<params>]was actually/script <name>,<func>(handler splits toName + Funcand ignores any 3rd arg). That fix went in last PR; this PR is the comprehensive sweep of every remaining drift.Defects fixed
/warp<area>[,<x>,<y>,<z>](non-DM Info category)Instance, not coordinates; warps to area's firstPortalName$[i]<area>[,<instance>] -- warp self to area's first portal(moved to DM-only)/warpother<player>,<area>[,<x>,<y>,<z>]<player>,<area>[,<instance>] -- warp another player/yellFirstOnlinePlayerengine-wide chain (:408-414)/xp<player>,<amount>GiveXP(AI, Int(Params$))— single arg, self (:335)<amount> -- grant XP to self/gold<player>,<amount>AI\Gold = AI\Gold + Int(Params$)(:340)<amount> -- adjust own gold (negative to deduct)/setattribute<player>,<attr>,<value>AI(:354)<attr>,<value> -- set own attribute/setattributemax<player>,<attr>,<value><attr>,<value> -- set own max attribute/ability<player>,<ability>Name,Level2-arg;AddSpell(AI, ...)(:577-580)<ability>,<level> -- grant own ability at level/give<player>,<item>[,<amount>]Upper$(Params$)whole-string item-name match; assigns toAI(:588-602)<item> -- spawn item into own inventory/gmFirstOnlinePlayerbut re-checksA2\Account.IsDM(:422-427) — DM-to-DM only/warpalso moved out of the non-DM Info summary line into the DM-only summary line, since its handler at :531 requiresAccount\IsDM.Block comment added
Above the DM-only
Ifblock inSendChatHelpDetail, a comment now records the self-target invariant for future contributors:This keeps the next reviewer from re-introducing the
<player>,...mistake when they add a new DM command.Doc follow-up
Two stale entries in
docs/protocol/packets/P_ChatMessage.md(the catalogue I just merged in #290) had the same<x>,<z>mistake copied from the broken help text. Corrected.Test plan
compile.bat -tclean (Server + Client + GUE + Project Manager)Casehandler at the line range cited in the table abovedocs/protocol/packets/P_ChatMessage.md) updated for/warpand/warpother🤖 Generated with Claude Code