mirror of
https://github.com/ArnoldSmith86/virtualtabletop.git
synced 2026-03-02 22:57:02 -05:00
Cannot set playerName in a called routine #676
Labels
No labels
PCIO compatibility
Validator
automated testing
bug
documentation
duplicate
editor
enhancement
enhancement
library
library
maintenance
needs legacy server
pile related
reported client crash
routine operations
user interface
widget properties
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/virtualtabletop#676
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @96LawDawg on GitHub (Feb 15, 2023).
This does not work:
@robartsd commented on GitHub (Feb 16, 2023):
I think this is because the called routine has its own namespace. It inherits copies of variables defined in the calling routine, but changes made in the calling routine get thrown out when the routine terminates. The special playerName and playerColor variables are only updated if they have changed at the end of the root routine. Of course it is possible to collect these in a called routine, but they would need to be passed back to the calling routine (in the result variable) to be set.