forked from Mirrors/openclonk
Prevent script error in buy menu
ERROR: '->': invalid target type nil, expected proplist by: Object(9419)->GetBuyValue() (Objects.ocd/Libraries.ocd/Structures.ocd/Vendor.ocd/Script.c:23) by: Object(9419)->DoBuy(0,0,0,Object(270),0,true) (Objects.ocd/Libraries.ocd/Structures.ocd/Vendor.ocd/Script.c:77) by: Object(9419)->OnBuyMenuSelection(0,0,Object(270)) (Objects.ocd/Libraries.ocd/Structures.ocd/Vendor.ocd/Script.c:269) by: Object(60927)->OnMenuEntrySelected({index = 2, slot = 1},10) (Objects.ocd/HUD.ocd/ObjectInteractionMenu.ocd/Script.c:880) by: Object(60940)->DoCall(10,0,Object(60927)) (Objects.ocd/HUD.ocd/MenuStyles.ocd/List.ocd/Script.c:166) by: Object(60940)->OnClick(0,0,6090,10,Object(60940)) (Objects.ocd/HUD.ocd/MenuStyles.ocd/List.ocd/Script.c:175)install-platforms
parent
d43051b180
commit
3583bfcbb6
|
@ -262,6 +262,7 @@ public func GetBuyMenuEntries(object clonk)
|
|||
|
||||
public func OnBuyMenuSelection(id def, extra_data, object clonk)
|
||||
{
|
||||
if (!def) return;
|
||||
// distinguish owners
|
||||
var wealth_player = GetOwner();
|
||||
var for_player = clonk->GetController();
|
||||
|
|
Loading…
Reference in New Issue