Jump to content

Type Mismatch


leahnnovash

Recommended Posts

Without a documentation, we are merely reduced to coding blind and that way we cannot really go as far as we wish we could. Currently, I have followed to the last letter the instructions to replace a screen found on the very weak documentation provided with the SDK. Here is my code:

Screen.Movie.Stack.Push(Screen.Movie.Pres.Spawn(class'UIMPCustomSquadSelect_ListItem', Screen.Movie.Pres));

UIMPCustomSquadSelect_ListItem extends (obviously) UIMPSquadSelect_ListItem.

 

Now, the compiler returns a type mismatch for the Push function. Scouring the code for examples on the Push function returns examples aplenty but all of them slightly different from each other. So it is no help. I am hoping that someone that successfully replaced a screen like the sdk doc told them to do know what I am doing wrong.

Link to comment
Share on other sites

I see no logical difference between what he did and what I did.

 

The OnInit method receives the screen itself as a parameter from the ScreenListener, but AlexF gathers the Screen from the ScreenStack itself as he is acting on a button click. Then he uses the exact same logical line than I used. Unless... unless the game sends it to me as a generic object and I need to typecast it.

 

Worth a shot. Will test and comment in a few.

Link to comment
Share on other sites

This worked for me from a Facility. It massively depends where you're pushing from, though.

 

`HQPRES.ScreenStack.Push(Spawn(class'UIChooseThing', self), `HQPRES.Get3DMovie());

 

Also, if it's not a screen, then yeah, that's not going to help ; )

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...