Graal Forums  

Go Back   Graal Forums > Development Forums > Tech Support
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-03-2010, 12:30 AM
MrOmega MrOmega is offline
One More Time
MrOmega's Avatar
Join Date: Aug 2010
Location: TN, USA
Posts: 631
MrOmega is an unknown quantity at this point
Send a message via AIM to MrOmega Send a message via MSN to MrOmega Send a message via Yahoo to MrOmega
array issues

ok so none of these are working for me

PHP Code:
obj.delete(index)
obj.remove(obj2)
obj.replace(index,obj2)
obj.insert(index,obj2
i've tried a few things but they just simply wont work... why...
__________________
Time is the fire in which we burn...
Up, Up, Down, Down, Left, Right, Left, Right, B, A, Select, Start! Now I got 99 LIVES!!!
Reply With Quote
  #2  
Old 11-03-2010, 12:42 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Try this:

PHP Code:
function onCreated() {
  
temp.arr = {
    
012345
  
};
  
temp.arr.insert(32.5); // Inserts 2.5 in arr[3]
  
temp.arr.remove(5); // Removes an instance of 5 from array
  
temp.arr.delete(0); // Deletes arr[0] from array
  
temp.arr.replace(1"1.lolz"); // Replaces arr[1] with "1.lolz"
  
echo(temp.arr); // echos "1,1.lolz,2.5,3,4"

I told you this before in the beta thread, you should post your usage of the functions with your reports.
__________________
Quote:
Reply With Quote
  #3  
Old 11-03-2010, 12:48 AM
MrOmega MrOmega is offline
One More Time
MrOmega's Avatar
Join Date: Aug 2010
Location: TN, USA
Posts: 631
MrOmega is an unknown quantity at this point
Send a message via AIM to MrOmega Send a message via MSN to MrOmega Send a message via Yahoo to MrOmega
there is no specific thing they are not working at all, although what you gave works but one of things i'm doing isnt
PHP Code:
temp.list.insert32.5);
echo( 
temp.list[ 3]); 
still returns the original temp.list[ 3], temp.list is a list of player weapons
__________________
Time is the fire in which we burn...
Up, Up, Down, Down, Left, Right, Left, Right, B, A, Select, Start! Now I got 99 LIVES!!!
Reply With Quote
  #4  
Old 11-03-2010, 12:54 AM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Quote:
Originally Posted by MrOmega View Post
there is no specific thing they are not working at all, although what you gave works but one of things i'm doing isnt
PHP Code:
temp.list.insert32.5);
echo( 
temp.list[ 3]); 
still returns the original temp.list[ 3], temp.list is a list of player weapons
When copying the weapons array the temp.var will actually act as a reference to the same object, which I believe is read-only.
Reply With Quote
  #5  
Old 11-03-2010, 12:56 AM
MrOmega MrOmega is offline
One More Time
MrOmega's Avatar
Join Date: Aug 2010
Location: TN, USA
Posts: 631
MrOmega is an unknown quantity at this point
Send a message via AIM to MrOmega Send a message via MSN to MrOmega Send a message via Yahoo to MrOmega
Quote:
Originally Posted by ffcmike View Post
When copying the weapons array the temp.var will actually act as a reference to the same object, which I believe is read-only.
that's... stupid.
__________________
Time is the fire in which we burn...
Up, Up, Down, Down, Left, Right, Left, Right, B, A, Select, Start! Now I got 99 LIVES!!!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:31 AM.


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