I think the problem I am running into is that the info being read from the notecard isn’t the expected type needed in the prim I have set up. It’s been a few years since I have programmed so I’m at the point where I remember how to do some things but have forgotten a lot.
I’m sort of living that “knows just enough to be dangerous” cycle right now. J
I’m having the modified scripts attached to this message… I know I’m gonna smack myself in the skull when someone helps me out andshows me what is wrong.
Main prim Script:
integer sell_type = INVENTORY_OBJECT;
vector text_color = <1,1,1>;
float text_alpha = 1;
list items;
list descriptions;
list prices;
integer notecardline;
integer current_item;
Next_Item()
{
current_item++;
if(current_item >= llGetListLength(items))
{
current_item = 0;
}
llSetText(llList2String(descriptions,current_item) + "\n$L" + llList2String(prices,current_item),text_color,text_alpha);
llSetTexture(llList2String(items,current_item) + "PIC",ALL_SIDES);
}
Prev_Item()
{
current_item--;
if(current_item < 0)
{
current_item = llGetListLength(items) - 1;
}
llSetText(llList2String(descriptions,current_item) + "\n$L" + llList2String(prices,current_item),text_color,text_alpha);
llSetTexture(llList2String(items,current_item) + "PIC",ALL_SIDES);
}
default
{
state_entry()
{
llSetTexture("d2665d83-d5f5-d0a8-7fb7-89656f2d3f7a",ALL_SIDES);
llSetText("Offline Mode, Nows the time to add/remove items, then click to start.",text_color,text_alpha);
}
touch(integer number)
{
if(llDetectedKey(0) == llGetOwner())
{
state check_items;
}
}
}
state check_items
{
state_entry()
{
llSetText("Checking inventory",text_color,text_alpha);
if(llGetInventoryNumber(sell_type) == 0)
{
llOwnerSay("Nothing found in inventory. Reseting."

;
llResetScript();
}
if(llGetInventoryKey("_LIST"

== NULL_KEY)
{
llOwnerSay("Could not find the _LIST notecard. Remeber the name of the notecard is important and CaSe sensitive."

;
llResetScript();
}
else
{
llGetNumberOfNotecardLines("_LIST"

;
}
}
dataserver(key queryid, string data)
{
state setup_items;
}
on_rez(integer start_param)
{
llResetScript();
}
}
state setup_items
{
state_entry()
{
llSetText("Please Wait, Loading Items List.",text_color,text_alpha);
current_item = 0;
notecardline = 0;
llGetNotecardLine("_LIST",notecardline);
}
dataserver(key query_id, string data)
{
if (data != EOF)
{
integer item_mode = (notecardline - 0) % 2;
if(item_mode == 0)
{
if(llGetInventoryKey(data) == NULL_KEY)
{
llOwnerSay("Item: " + data + " couldn't be found in inventory. Reseting"

;
llResetScript();
}
else
{
if(llGetInventoryKey(data + "PIC"

== NULL_KEY)
{
llOwnerSay("Couldn't find the picture for " + data + " named " + data + "PIC. Reseting."

;
llResetScript();
}
descriptions += [data];
items += [data];
}
}
else if(item_mode == 1)
{
prices += [data];
}
notecardline++;
llGetNotecardLine("_LIST",notecardline);
}
else
{
state run_store;
}
}
on_rez(integer start_param)
{
llResetScript();
}
}
state run_store
{
state_entry()
{
llRequestPermissions(llGetOwner(),PERMISSION_DEBIT);
current_item = 0;
llSetText(llList2String(descriptions,0) + "\n$L" + llList2String(prices,0),text_color,text_alpha);
llSetTexture(llList2String(items,0) + "PIC",ALL_SIDES);
}
on_rez(integer start_param)
{
llResetScript();
}
changed(integer type)
{
if(type & CHANGED_INVENTORY)
{
llResetScript();
}
}
run_time_permissions(integer type)
{
if(type & PERMISSION_DEBIT)
{
}
else
{
llOwnerSay("Permissions must be granted for refund setup incomplete. Reseting"

;
llResetScript();
}
}
money(key giver, integer amount)
{
integer cost = (integer)llList2String(prices,current_item);
if (amount == cost)
{
llInstantMessage(giver,"Thank you for your purchase!"

;
llGiveInventory(giver,llList2String(items,current_item));
}
if (amount > cost)
{
integer change =0;
llInstantMessage(giver,"Here is your change. Thank you for your purchase!"

;
llGiveInventory(giver,llList2String(items,current_item));
change = amount - cost;
llGiveMoney(giver,change);
}
if (amount < cost)
{
llInstantMessage(giver, "Sorry, That's not enough to buy this item. It costs L$" + llList2String(prices,current_item));
llGiveMoney(giver, amount);
}
}
link_message(integer sender, integer number, string message, key id)
{
if(message == "NEXT"

{
Next_Item();
}
else if (message == "PREV"

{
Prev_Item();
}
}
}
"Play Prim" Script
default
{
touch_start(integer total_number)
{
llPlaySound("current_item", 2);
}
Once again thanks for any help.