Unrecognized member 'name' in class 'PlayerPawn'

Discussions about Coding and Scripting
User avatar
Posts: 2864
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Unrecognized member 'name' in class 'PlayerPawn'

Post 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;
"If Origin not in center it be not in center." --Buggie
User avatar
Posts: 302
Joined: Wed Nov 09, 2016 1:48 am

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

Post 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.
Signature goes here.
User avatar
Posts: 9958
Joined: Thu Jun 30, 2011 8:12 pm
Personal rank: God of Fudge
Location: Palo Alto, CA

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

Post 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"?
medor wrote:Replace Skaarj with EvilGrins :mrgreen:
Smilies · viewtopic.php?f=8&t=13758
User avatar
Posts: 6427
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

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

Post 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.