sorry missed the ='s and incase you haven't got it you'll need these 2 lines at the top
Code:
#include <acknex.h>
#include <default.c>

PANEL* pnl_inventory = 
{
layer 1; //etc.... etc... and stuff...
}

function fnc_inv_toggle()
{
toggle(pnl_inventory,VISIBLE);
}

void main()
{
on_i = fnc_inv_toggle;
}