![]() |
|
|
#1 |
|
Hey all,
I am programming for a Deus Ex mod which uses UE1 and I have a problem that is very odd. I declare an enumeration: Code:
enum summerBarks
{
BM_Idle,
BM_CriticalDamagePlayer,
BM_CriticalDamageGeneric,
etc...
}
var summerBarks sB;
Code:
function bool SummerStartAIBarkConversation(Actor conOwner,SummerBarkManager.summerBarks sB) I get this error: : Error, Missing variable name Failed due to errors. for the above line involving the function. If I simply make it Code:
function bool SummerStartAIBarkConversation(Actor conOwner,summerBarks sB) I get: : Error, Unrecognized type 'summerBarks' Please tell me what I am doing wrong and notify me of a strategy to make this work. Thanks in advance. |
|
|
|
|
|
|
#2 |
|
Enums and structs are only known in subclasses of the class they are declared in. Unlike later engine generations, UE1 doesn't provide any way reasonable around that limitation.
Even UT2004 has identical ESurfaceTypes declarations in the Actor and Material classes. However, I think that's mainly for reasons concerning the native code. Due to the new DependsOn() class modifier, UE2 classes can actually share structs and enums.
__________________
Wormbo's UT/UT2004/UT3 mods | YouTube channel | PlanetJailbreak | Unreal Wiki | Liandri Archives Everything you ever wanted to know about replication | UnrealScript security considerations <elmuerte> you shouldn't do all-nighters, it's a waste of time and effort <TNSe> nono <TNSe> its always funny to find code a week later you dont even remember writing <Pfhoenix> what's worse is when you have a Star Wars moment <Pfhoenix> "Luke! I am your code!" "No! Impossible! It can't be!" |
|
|
|
|
|
|
#3 |
|
Thanks for the reply
Yeah Actor.uc consists of the enum that was used for the original functions...would that mean I'd have to code for a custom Actor class thus recoding EVERYTHING?
|
|
|
|
|
|
|
#4 |
|
No, just create an abstract class with the enum methods in, the subclass THAT with your actual class.
|
|
|
|
|
|
|
#5 |
|
In any case, enums are just named byte values. You should be able to assign between them with some combination of intermediate byte variable and typecasting.
__________________
Wormbo's UT/UT2004/UT3 mods | YouTube channel | PlanetJailbreak | Unreal Wiki | Liandri Archives Everything you ever wanted to know about replication | UnrealScript security considerations <elmuerte> you shouldn't do all-nighters, it's a waste of time and effort <TNSe> nono <TNSe> its always funny to find code a week later you dont even remember writing <Pfhoenix> what's worse is when you have a Star Wars moment <Pfhoenix> "Luke! I am your code!" "No! Impossible! It can't be!" |
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|