Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-28-2015, 03:54 PM
Kirko Kirko is offline
Registered Guest
Join Date: Dec 2014
Location: Texas
Posts: 61
Kirko has a spectacular aura aboutKirko has a spectacular aura about
Script Help.

Why doesn't this script remove the player from the array? What I'm trying to do is get the list of members in a guild then remove the player that is said. Everything works but the removing of the player. The player I'm trying to remove is "Test".

PHP Code:
function ContinueToRemove(memberguild){
  
temp.test NULL;
  
/*temp.remove = format(
    "UPDATE Guilds" NL
    " SET Members = REPLACE(Members, '%s', NULL)" NL
    "  WHERE Name = '%s'",
    temp.member, temp.guild
  );*/

  
temp.remove format(
    
"UPDATE Guilds" NL
    
" SET Members = '%s'" NL
    
"  WHERE Name = '%s'",
    
temp.testtemp.guild
  
);
  
//temp.req = requestSQL(temp.remove, false);
  
  
for(temp.i=0temp.GetMembers(temp.guild).size(); temp.i++){
    
temp.test.add(GetMembers(temp.guild)[i]);
    echo(
"Created Array" SPC temp.i SPC ":" SPC temp.test);
  }
  for(
temp.n=0temp.temp.test.size(); temp.n++){
    if(
temp.test[n] == temp.member){
      echo(
"Remove:" SPC temp.test[n]);
      echo(
"From:" SPC temp.test);
      echo(
"New Array:" SPC temp.test.delete(n));//isnt working
    
}
  }
  echo(
"------------------------------");

I also tried doing remove instead of delete and still didn't work

this is what echos into rc.
[12:39] ------------------------------
[12:39] Updated Array: Graal1341684,
[12:39] Updated Array: Graal1341684,Holder
[12:39] Updated Array: Graal1341684,Holder,Test
[12:39] Updated Array: Graal1341684,Holder,Test,Holder2
[12:39] Remove: Test
[12:39] From: Graal1341684,Holder,Test,Holder2
[12:39] New Array: 0
[12:39] ------------------------------
Reply With Quote
 


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 05:25 PM.


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