Unrecognized member 'name' in class 'PlayerPawn'

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

Unrecognized member 'name' in class 'PlayerPawn'

Post by Barbie » Sat Jun 25, 2022 12:17 pm

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: 263
Joined: Wed Nov 09, 2016 1:48 am

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

Post by ExpEM » Tue Aug 02, 2022 8:55 am

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: 8817
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 » Wed Aug 03, 2022 12:06 am

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: 5873
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

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

Post by sektor2111 » Wed Aug 03, 2022 6:24 pm

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.