Page 1 of 1

Unrecognized member 'name' in class 'PlayerPawn'

Posted: Sat Jun 25, 2022 12:17 pm
by Barbie
I try to set the tag of an Actor to the name of another actor that is global defined, but compiling fails if I do that directly:

Code: Select all

class WhatEver extends Info;

var PlayerPawn Player;

function SetTagToName() {
// sets the TAG to the name of this object
local Actor A;

	// Tag = Player.name; <- does not compile: ": Error, Unrecognized member 'name' in class 'PlayerPawn'"

	// but this does compile:
	A = Player;
	Tag = A.name;
}
:noidea

Re: Unrecognized member 'name' in class 'PlayerPawn'

Posted: Sat Jun 25, 2022 7:21 pm
by Buggie

Re: Unrecognized member 'name' in class 'PlayerPawn'

Posted: Tue Aug 02, 2022 8:55 am
by ExpEM
I expect the code error is due to some deep down native code due to PlayerPawns not being a constant over network play aka PlayerPawn0 will be the local host on every connected instance.

Re: Unrecognized member 'name' in class 'PlayerPawn'

Posted: Wed Aug 03, 2022 12:06 am
by EvilGrins
Are you trying to put a PlayerPawn on a map, kinda like a bot, so it has an actual name and doesn't show up in the Score List as "PlayerPawn"?

Re: Unrecognized member 'name' in class 'PlayerPawn'

Posted: Wed Aug 03, 2022 6:24 pm
by sektor2111
Barbie was talking about a compilation problem not about a PlayerPawn added in map as long as such thing does funky stuff as already mentioned in forum elsewhere.