Hiii, I have coded an event script for staff to use. I'm running into this issue however. Using multiple words in the event name leads to having commas after each word. Is there another way to do this without adding multiple word events into an array?

PHP Code:

    
// Check when the chat ends for events with multiple words
    
for (temp.19i++) {
      if (
temp.tokens[i] == NULL) {
        
temp.i;
        break;
      }
      if (
== 8) {
        
player.chat "Error! Your event must be less than 8 characters!";
        return;
      }
    }
    
    
// Check to see if the time is a valid time
    
for (temp.061i++) {
      if (
temp.tokens[temp.1] == i) {
        break;
      }
      
// If i reaches 60, they did not enter a valid time
      
if (== 60) {
        
player.chat "Error! Syntax: /events 'The event' 'Time (less than 60 seconds)'";
        return;
      }
    }
    
    
// Extra verification
    
if (temp.tokens[1] == NULL || temp.tokens[2] == NULL) {
      
player.chat "Error! Syntax: /events 'The event' 'Time (less than 60 seconds)'";
      return;
    }
    
    
// Add the event to an array for events with multiple words
    
temp.eventT = {};
    for (
temp.1temp.1i++) {
      
temp.eventT.add(temp.tokens[i]);
    }
    
onEvent(temp.eventTtemp.tokens[temp.1]);