Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Editing clientr.arrays... !pissed! (https://forums.graalonline.com/forums/showthread.php?t=76020)

DustyPorViva 08-01-2007 06:08 PM

Editing clientr.arrays... !pissed!
 
I'm getting really annoying... anytime I try to edit a subarray for a clientr.array, it never changes the value.

PHP Code:

function onActionserverside() {
  if (
params[0]=="refreshinfo") {
    for (
i=0;i<clientr.items.size();i++) {
      
temp.newarray=findNPC("Items").(@clientr.items[i][0]);
      
clientr.items[i][2]=temp.newarray;
    }
  }


Now it's supposed to take the array from the Items DBNPC and replace the current array, but it's not changing it at all. The even more annoying thing is that
PHP Code:

  if (params[0]=="addquantity") {
    
temp.newarray[1]=params[2];
    
clientr.items[params[1]]=temp.newarray;
  } 

DOES work. Anything I'm doing wrong here that's preventing me from editing the subarrays?


All times are GMT +2. The time now is 09:05 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.