unrecognized type [ut2k4]

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Axionysus

Don't Call Us, We Won't Call You :)
Sep 6, 2004
368
0
0
37
DNS #5
flakmonkey.t35.com
I've searched everywhere and cannot figure this one out. I'm trying to use some of my variables, declared in my Object subclass, as types in other classes. Here is the declaration for the variables in the aforementioned other classes -

Code:
var AxionDataStorage.PlayerName PlayerName;
var AxionDataStorage.Experience Experience;
var AxionDataStorage.Rank Rank;
var AxionDataStorage.PointsPerLevel PointsPerLevel;
var AxionDataStorage.Version Version;

(AxionDataStorage is my Object subclass)
Here is the error I am getting -
Error: C:\UT2004\Axion\Classes\AxionGameInfo.uc(5) : Error, Unrecognized type 'PlayerName' within 'AxionDataStorage'

Thanks in advance
- axion
 

Wormbo

Administrator
Staff member
Jun 4, 2001
5,913
36
48
Germany
www.koehler-homepage.de
Are those structs or enums you are referencing?
If yes, I recommend adding "dependson(AxionDataStorage)" to your class declaration line, e.g. "class AxionGameInfo extends Whatever dependson(AxionDataStorage);"
 

datacable

N00b coder
Sep 2, 2002
60
0
0
Visit site
Axionysus said:
I'm trying to use some of my variables, declared in my Object subclass, as types in other classes.
You can't do this. A variable declared in another class is not a datatype, and can't be used as such. You can declare the class as a datatype, then access it's members individually (so long as your object variable has a valid reference assigned to it).
 

Axionysus

Don't Call Us, We Won't Call You :)
Sep 6, 2004
368
0
0
37
DNS #5
flakmonkey.t35.com
I apologize SolidSnake, I must have missed it as I had something else going on, I changed the code as per DataCable's advice and it still doesn't work. (For everyone else, this code is part of my attempt to use packages [.uvx] for storing pawn data and then access it in many different classes) You suggested that it must be some other code I have but I still haven't figured out what.