Unrecognized member 'name' in class 'PlayerPawn'

Discussions about Coding and Scripting
Post Reply
User avatar
Barbie
Godlike
Posts: 2792
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;
}
:noidea
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
ExpEM
Adept
Posts: 298
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
EvilGrins
Godlike
Posts: 9668
Joined: Thu Jun 30, 2011 8:12 pm
Personal rank: God of Fudge
Location: Palo Alto, CA
Contact:

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"?
http://unreal-games.livejournal.com/
Image
medor wrote:Replace Skaarj with EvilGrins :mrgreen:
Smilies · viewtopic.php?f=8&t=13758
User avatar
sektor2111
Godlike
Posts: 6403
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.
Post Reply