Jump to content

Menu for none renters/owners


LilyMai Faith
 Share

You are about to reply to a thread that has been inactive for 2680 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi

Can someone please help me, I am wanting to create a type of rental where when the owner clicks they get one menu, when the person who has paid rent will get another menu, then a final menu for non-owner/renters. 

So far I have it working so far where I can get the menu to show for the owner and one for the renters but as soon as I try to add the last one (the menu that will show for none renters/owners it messes up the rest.) Below is roughly what I am trying to work with. (Please note I am only a novice script so any help will be appreciated!!)

touch_start(integer number_detected)
{
key aviKey = llDetectedKey(0);
if (aviKey == OwnerKey)
{
LoadTime = LOAD_TIMER;
MenuList = [Info, Reset, Exit];
llDialog(OwnerKey, getDialogString(aviKey), MenuList, setChannel());
}
else
if (aviKey == RenterKey)
{
LoadTime = LOAD_TIMER;
MenuList = [GeneralInfo, RentalInfo, Exit, Help];
llDialog(RenterKey, getDialogString(aviKey), MenuList, setChannel());
}
else
LoadTime = LOAD_TIMER;
MenuList = [Remaining, Rentaltime, MessageSupport, Exit];
llDialog(aviKey, getDialogString(aviKey), MenuList, setChannel());

 

Link to comment
Share on other sites

hi try something like this.

 

list OwnerDialog = ["owner","owner1","owner2"]; //<----saperate dialog for ownter
list RenterDialog = ["renter","renter1","renter2"]; //<----saperate dialog for renter
list OtherDialog = ["other","other1","other2"]; //<-----------saperate dialog for others
string message = "\n Please make a choice."; //<----message to post on dialog
list OwnerKey = []; //<---------owner keys
list RenterKey = []; //<-------renter keys
list OtherKey = []; //<------other keys
key ToucherID; //<------ toucher key
string ToucherName;
integer ChannelDialog;
integer ListenerRemoverID;


default{


state_entry(){

ChannelDialog = -1 - (integer)("0x" + llGetSubString( (string)llGetKey(), -7, -1) );
}


touch_start(integer total_num){


ToucherID = llDetectedKey(0);


if(~llListFindList(OwnerKey,[(string)ToucherID])){

llDialog(ToucherID, message,OwnerDialog, ChannelDialog);
ListenerRemoverID = llListen(ChannelDialog, "", ToucherID, "");
}
else if(~llListFindList(RenterKey,[(string)ToucherID])){


llDialog(ToucherID, message,RenterDialog, ChannelDialog);
ListenerRemoverID = llListen(ChannelDialog, "", ToucherID, "");
}
else if(~llListFindList(OtherKey,[(string)ToucherID])){

llDialog(ToucherID, message,OtherDialog, ChannelDialog);
ListenerRemoverID = llListen(ChannelDialog, "", ToucherID, "");
}

else{
llInstantMessage(ToucherID,"you are not Authorised");
}


}
}

 

 

Link to comment
Share on other sites

In the else branch the brackets are missing.

key aviKey = llDetectedKey(0);if (aviKey == OwnerKey){	LoadTime = LOAD_TIMER;	MenuList = [info, Reset, Exit];	llDialog(OwnerKey, getDialogString(aviKey), MenuList, setChannel());}else if (aviKey == RenterKey){	LoadTime = LOAD_TIMER;	MenuList = [GeneralInfo, RentalInfo, Exit, Help];	llDialog(RenterKey, getDialogString(aviKey), MenuList, setChannel());}else {	LoadTime = LOAD_TIMER;	MenuList = [Remaining, Rentaltime, MessageSupport, Exit];	llDialog(aviKey, getDialogString(aviKey), MenuList, setChannel());}
  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2680 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...