Code: Select all
UserMgr.MainUser.Id
Code: Select all
declare Ident MyUserID for LocalUser;
MyUserID = UserMgr.MainUser.Id;
Code: Select all
declare Ident MyUserID for LocalUser;
What is a proper solution on this?
Moderator: English Moderator
Code: Select all
UserMgr.MainUser.Id
Code: Select all
declare Ident MyUserID for LocalUser;
MyUserID = UserMgr.MainUser.Id;
Code: Select all
declare Ident MyUserID for LocalUser;
Code: Select all
ParentApp.UserMgr.MainUser.Id
Code: Select all
declare Text Variable for MyLayer.LocalPage;
Code: Select all
declare Text Variable for Page;
Code: Select all
Void ShowMedals(CTmMode _Rules) {
declare CUILayer UIMedals;
UIMedals = _Rules.UIManager.UILayerCreate();
UIMedals.ManialinkPage = "file://media/manialinks/uimedals.xml";
declare Integer UserRecord for UIMedals.LocalPage;
UserRecord = ScoreMgr.Map_GetRecord(NullId, Map.MapInfo.MapUid, "Race");
log(UserRecord);
_Rules.UIManager.UIAll.UILayers.add(UIMedals);
}
Code: Select all
declare Integer UserRecord for Page;
if (UserRecord !=-1) (Page.GetFirstChild("RecordTime") as CMlLabel).SetText(TextLib::TimeToText(UserRecord));
Code: Select all
ERR [Libs/TrackMania/TMRace.Script.txt: 265, 41] Null object does not support declaration of attribute UserRecord.
TMRace::ShowMedals() [265, 41]
RaceSolo::Main() [71, 10]
Code: Select all
wait(UIMedals.LocalPage != Null);
Doesn't work. It sticks loading. Even if I use the code in the manialink, it shows an error with UserId:Dommy wrote: ↑30 Jun 2018, 12:03 You're trying to define UserRecord for a Null LocalPage, meaning your layer wasn't initialized yet. Either try using manialink code directly in the ManialinkPage or try yielding the script before setting the user record.
Code: Select all
wait(UIMedals.LocalPage != Null);
Code: Select all
Invalid access to parameter (Null object or elem not found in array) : ScoreMgr>.Map_GetRecord
Code: Select all
ERR [Libs/TrackMania/TMRace.Script.txt: 265, 41] Null object does not support declaration of attribute UserRecord.
TMRace::ShowMedals() [265, 41]
RaceSolo::Main() [71, 10]
Users browsing this forum: No registered users and 1 guest