Author Topic: 1 line of code not working properly  (Read 1108 times)

Hey, so I'm making a party system but this part isn't working.. wondering if anyone sees anything I don't.

Starts here and works here:
Code: [Select]
  commandToClient(%obj.client,'MessageBoxYesNo',"Invite" SPC %col.client.rpName SPC "?","Are you sure you wish to invite " @ %col.client.rpName SPC "to your party?",'SendGroupInvite');
Sent to here:
Code: [Select]
function sendGroupInvite(%client)
{
   %client.colorChosen = getFlagColor(%client);
   %target = findClientByName(%client.invTarget);
   %target.potentialLeader = %client.name;
   commandToClient(%target.client,'MessageBoxYesNo',%client.rpName SPC "has invited you to group up",%client.rpName SPC "has requested you join them on their travels. Do you accept their proposal?",'acceptGroupInvite');
   %target.consideringParty = 1;
   messageClient(%client,'',"\c6Party invite sent.");
   schedule(10000,0,'clearConsideration',%target);
}

Doesn't make it to here from the YesNoBox output:
Code: [Select]
function acceptGroupInvite(%client)
{
   echo("IT MADE IT" SPC %client.name);
   if(!%client.consideringInvite == 1)
   {
      messageClient(%client,'',"\c6The invite is too old.");
      expiredInvite(%client);
      return;
   } etc

Anyone got any ideas? The function I'm trying to get it to works perfectly, it just won't go there without me manually inputing :(

Add servercmd to those functions.

Why? They're for use with an item

Why? They're for use with an item

You're telling the client what serverCmd to send when yes is pressed by sending the name as the last argument in a messageboxyesno command

Does it have to be a serverCmd? Weird that the 'SendGroupInvite' YesNo output works but the 'acceptGroupInvite' doesn't... Must be because it's a different client. Okay, I'll give it a bash! I might not get to test it again til tomorrow since I've got to go to bed and it requires a second person to test.

Thanks for the help though guys