Getting Name of Player or Leader name in [store_side] variable?
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
- Lord-Knightmare
- Discord Moderator
- Posts: 2490
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Getting Name of Player or Leader name in [store_side] variable?
I am on Wesnoth 1.19
I have a variable called
So, I am trying to show this in a
Expected:
What I got: blank...
So something is a bug...
I tried swapping
The stored_side variable does not seem to have
I have a variable called
$temp_side[1]
(where 1 is the side number) which is created from a [store_side]
. this is done for sides 1,2 and 3.So, I am trying to show this in a
[message]
with $temp_side[1].name|
Expected:
Lord-Knightmare
or the value of the name
attribute in the variable.What I got: blank...
So something is a bug...
I tried swapping
name
with side_name
but still the same case.The stored_side variable does not seem to have
name=
, but shows side_name
as blank or ""
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
-
- Posts: 582
- Joined: August 4th, 2019, 5:27 pm
- Contact:
Re: Getting Name of Player or Leader name in [store_side] variable?
It seems to be incorrect documentation. Neither 1.14, nor 1.16 doesn't have anything in wesnoth.sides[1].name. It's a property of a unit that become the leader, not of the side per se
Co-founder and current maintainer of IsarFoundation, Afterlife Rated and overall Wesnoth Autohost Project
MP versions of classical mainline campaigns: UtBS, TRoW, SotA
Developer and maintainer of my fork of World Conquest, Invincibles Conquest II
MP versions of classical mainline campaigns: UtBS, TRoW, SotA
Developer and maintainer of my fork of World Conquest, Invincibles Conquest II
- Lord-Knightmare
- Discord Moderator
- Posts: 2490
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: Getting Name of Player or Leader name in [store_side] variable?
Ah, to get the name of the leader/canrecruit=yes unit, I then store that as the variable? Okay. will try that.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium