View Single Post
  #28  
Old 08-28-2009, 02:51 AM
Mark Sir Link Mark Sir Link is offline
Kevin Azite
Mark Sir Link's Avatar
Join Date: Sep 2005
Posts: 1,489
Mark Sir Link is just really niceMark Sir Link is just really nice
Send a message via AIM to Mark Sir Link
Quote:
Originally Posted by sssssssssss View Post
Just want to say first, I thank everyone for their help. I can do more than most, but I learn best through someone correct my mistakes, and at times showing me whats wrong. With that said:

I was attempting to make a loop, so when it does the playertouchsme, then does say 2, i dont have to type out every part of each var and array. I know you can do it, and I know im doing it wrong. I can only get it to say the first match.
rather than having it say2, you should make a var that keeps appending as you go through the loop, then say2 at the end.

also, in your script, you are only getting the say2 to display for the array sdematch1 rather than cycling through.

try replacing it with

PHP Code:
function onPlayerTouchsMe()
{
  
temp.matchlist "";
  for (
temp.1temp.<= 10temp.++)
  {
    
matchlist @= "Match " ": " this.sdematch(@i)[0] @ " vs. " this.sdematch(@i)[1] @ "#b";
  }
  
say2(matchlist);

Reply With Quote