Jump to content

making a name tag but ran into a issue modding this script to hold more letters


sophy7777
 Share

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

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

Recommended Posts

 im trying to make a menu for name tags, i have the alphabet in textures so 29 textures in all. this ornignaly was a 22 holding script that i tried to add a menu too, but hasnt really gone to plan. could anyone asist me in where im going wrong here? i thought adding another list and following the flow of the script would result in another menu added. i may be missing something ovious here so please excuse me if i have! when i try to click my modded script it tells me this;

 

[18:51] Object [script:menu_textute_change] Script run-time error
[18:51] Stack-Heap Collision

 

 

heres my modded script

list MENU1 = [];
list MENU2 = [];
list MENU3 = [];
integer lisn;
integer MENU_CHANNEL = 1230;
 
// opens menu channel and displays dialog
Dialog(key id, list menu)
{
    llListenRemove(lisn);
    lisn = llListen(MENU_CHANNEL, "", NULL_KEY, "");
    llDialog(id, "Select one object below: ", menu, MENU_CHANNEL);
}
 
default
{
    on_rez(integer num)
    {
        llResetScript();
    }
  
    listen(integer channel, string name, key id, string message) 
    {
        if (channel == MENU_CHANNEL)
        {
            llListenRemove(lisn);  
            if (message == ">>")
            {
                Dialog(id, MENU1);
            }
            else if (message == ">>")
            {
                Dialog(id, MENU2);
            }        
            else if (message == "<<")                    
            {
                Dialog(id, MENU3);
                }        
            else if (message == "<<")                    
            {
                 
                llSetTexture(message, ALL_SIDES); // display the texture from menu selection 
 
            }      
        }
    }
     touch_start(integer total_number)
    {
        integer i = 0;
        MENU1 = [];
        MENU2 = [];
        MENU3 = [];
        // count the textures in the prim to see if we need pages
        integer c = llGetInventoryNumber(INVENTORY_TEXTURE);
        if (c <= 12)
        {
            for (; i < c; ++i)
                MENU1 += llGetInventoryName(INVENTORY_TEXTURE, i);
        }
        else
        {        
            for (; i < 11; ++i)
                MENU1 += llGetInventoryName(INVENTORY_TEXTURE, i);
            for (; 12 <22; ++i)
                MENU2 +=  llGetInventoryName(INVENTORY_TEXTURE, i);
                  MENU2 += ">>";
                                        MENU3 += "<<";
            if(c > 34)
                            c = 34;
            for (; i < c; ++i)
                MENU3 += llGetInventoryName(INVENTORY_TEXTURE, i); 
                            MENU2 += ">>";
                                        MENU3 += "<<";   
                                                               
        }
        // display the dialog 
        Dialog(llDetectedKey(0), MENU1);
    }  
}

 

 

 

heres the oringinal 

list MENU1 = [];
list MENU2 = [];
list MENU3 = [];
integer lisn;
integer MENU_CHANNEL = 1230;
 
// opens menu channel and displays dialog
Dialog(key id, list menu)
{
    llListenRemove(lisn);
    lisn = llListen(MENU_CHANNEL, "", NULL_KEY, "");
    llDialog(id, "Select one object below: ", menu, MENU_CHANNEL);
}
 
default
{
    on_rez(integer num)
    {
        llResetScript();
    }
  
    listen(integer channel, string name, key id, string message) 
    {
        if (channel == MENU_CHANNEL)
        {
            llListenRemove(lisn);  
            if (message == ">>")
            {
                Dialog(id, MENU2);
            }
            else if (message == ">>")
            {
                Dialog(id, MENU1);
            }        
            else if (message == "<<")                    
            {
                Dialog(id, MENU1);
            }        
            else
            {
                
                llSetTexture(message, ALL_SIDES); // display the texture from menu selection 
 
            }      
        }
    }
     touch_start(integer total_number)
    {
        integer i = 0;
        MENU1 = [];
        MENU2 = [];
        MENU3 = [];
        // count the textures in the prim to see if we need pages
        integer c = llGetInventoryNumber(INVENTORY_TEXTURE);
        if (c <= 12)
        {
            for (; i < c; ++i)
                MENU1 += llGetInventoryName(INVENTORY_TEXTURE, i);
        }
        else
        {        
            for (; i < 11; ++i)
                MENU1 += llGetInventoryName(INVENTORY_TEXTURE, i);
            if(c > 22)
                            c = 22;
            for (; i < c; ++i)
                MENU2 += llGetInventoryName(INVENTORY_TEXTURE, i); 
                            MENU1 += ">>";
                                        MENU2 += ">>";
                                        for (; i < c; ++i)
                MENU2 += llGetInventoryName(INVENTORY_TEXTURE, i); 
                            MENU1 += ">>";
                                        MENU2 += ">>";                           
        }
        // display the dialog 
        Dialog(llDetectedKey(0), MENU1);
    }  
}

 

 

thanks in advance anyone who helps! 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1244 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...