PDA

View Full Version : Unrecognized member 'CreateMenu'... whats going on now...



TheSpaceMan
11-20-2009, 01:13 PM
Error, Unrecognized member 'CreateMenu' in class 'GameUISceneClient'

This is the call that fails UIController.SceneClient.CreateMenu(SceneToOpenRef erence, );

This is the code i used as a reference.

exec function TestMenu(string NewMenu)
{
local class<UIScene> SceneClass;
local UIInteraction UIController;

UIController = LocalPlayer(Player).ViewportClient.UIController;

`log("#### TestMenu:"@NewMenu);
if( LocalPlayer(Player) != None)
{
SceneClass = class<UIScene> ( DynamicLoadObject(NewMenu, class'Class'));
`log("### SceneClass:"@SceneClass);
UIController.SceneClient.CreateMenu(SceneClass, );
}
}

This is the code i wrote myself.

UIController = LocalPlayer(Player).ViewportClient.UIController;
SceneToOpenReference = class<UIScene> ( DynamicLoadObject("PointAndClickPackage.UI.PointAndClickUI", class'Class'));
UIController.SceneClient.CreateMenu(SceneToOpenRef erence, );


I looked up the GameUISceneClient, on row 1479 we have


exec function CreateMenu( class<UIScene> SceneClass, optional int PlayerIndex=INDEX_NONE )
{
...
}

So CreateMenu Should exist in GameUISceneClient. Excuse my language but... WTF?

Wormbo
11-20-2009, 02:13 PM
Note the preprocessor condition "`if(`notdefined(ShippingPC))" right above the CreateMenu() declaration. Did you maybe define "ShippingPC" somehow?

Anyway, CreateMenu looks like a debugging console command. You should probably use the CreateScene() and OpenScene() functions instead.

TheSpaceMan
11-20-2009, 03:24 PM
You are right. Now the problem is finding the right OpenScene Command. Seem to be a fair mix of them...

The load and create works now atleast...