Thanks Tomas -
I tried looking through the msg_neu.t library code as you suggested, but still just can’t seem to get the inventory listing to work in the sidebar. Here is some working code:
gameMain: GameMainDef
initialPlayerChar = me
;
- me: Actor
location = entranceHall
virusCount = 0
;
entranceHall: Room ‘Entrance Hall’
"You are in the entrance hall. There is a coffee machine in the corner. A window looks out over
the countryside. "
east = lounge
;
modify statusLine
showStatusHtml()
{
// shows the room the player is currently in
showStatusLeft();
// shows the players ‘IQ’ score and health
“
Health: <<100 - me.virusCount>><.statusscore>
IQ Score: <>
\n (<<getDescriptor()>>)<./statusscore>
”;
// show the player’s inventory
// “
You are carrying: \n<<me.showInventory(ListTall)>>”;
// add the status-line exit list, if desired
if (gPlayerChar.location != nil)
{
gPlayerChar.location.showStatuslineExits();
“<<statusHTML(0)>><<aHref(gLibMessages.commandLookAround, nil, nil, AHREF_Plain)>>
”;
}
}
getDescriptor()
{
if (scoreIQ>=100 && scoreIQ<110)
{return 'average';}
else if (scoreIQ>=110 && scoreIQ<120)
{return 'above average';}
else if (scoreIQ>=120 && scoreIQ<130)
{return 'superior';}
else if (scoreIQ>=130 && scoreIQ<140)
{return 'near genius';}
else return 'genius';
}
scoreIQ = 100 + libGlobal.scoreObj.totalScore
;
modify initDisplay()
{
webMainWin.createFrame(commandWin, ‘command’,‘0, 0, 80%, 80%’);
webMainWin.createFrame(statuslineBanner, ‘statusline’, ‘80%, 0, 100%, 100%’);
statuslineBanner.init();
statusLine.statusDispMode = StatusModeBrowser;
}
;
the line
You are carrying: \n<<me.showInventory(ListTall)>> is supposed to show the player’s inventory
in the sidebar between the score and the exit list - however, when I remove the //, it always results in an error
nil object reference
in
buildSynthParam(typeString, obj)
{
return ‘{’ + typeString + ’ ’ + gSynthMessageParam(obj) + ‘}’;
}