Thread: clientr arrays
View Single Post
  #3  
Old 07-31-2007, 02:27 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
That's just a debug line, so I could see what was being passed.
Anyways, I got it fixed, though I think it's a bug. I could not directly edit the clientr.items array, I had to make a temp.array to hold it, then edit it, and plug the info back into the clientr.items.
PHP Code:
  if (params[0]=="addquantity") {
    for (
i=0;i<clientr.items.size();i++) {
      if (
clientr.items[i][0]==params[1]) temp.itemindex=i;
    }
    
temp.items=clientr.items;
    
temp.items[temp.itemindex][1]=params[2];
    
clientr.items=temp.items;
  } 
Reply With Quote