Author Topic: Putting text into message,  (Read 4324 times)

Well i know how to but when it gets to %t4 %t5 and the others turn into %t4 and its just repeated. I do this:

Code: [Select]
function servercmdHello(%client, %t1, %t2, %t3, %t4, %t5, %t6, %t7, %t8, ){
%text = %t1 SPC %t2 SPC %t3 SPC %t4 SPC %t5 SPC %t6 SPC %t7 SPC %t8;
messageboxok(,"","Hello\n" @ %text");
}

If i typed /hello 1 2 3 4 5 6 7 8
it'd come out: 1 2 3 4 4 4

Argh no edit. that " after %text isnt ment to be there. Thats a typo. (Still need help)

After trying different methods anything i do it repeats the 4th word.

Code: [Select]
%t8,)doesn't look too good.

I think it may be the fact that Badspot's "usual" servercmds can only take so many arguments. For chat mods, try editing servercmdTeamMessageSent or servercmdMessagesent.

That was a typo. I tried messagesent  by looking at Randys PM mod but again it repeats the first word.

I think theres no such thing as %t5 and %t6 because i tryed echoing %t5 and %t6 from the /cmd and it comes up as %t4.

Well i know how to but when it gets to %t4 %t5 and the others turn into %t4 and its just repeated. I do this:

Code: [Select]
function servercmdHello(%client, %t1, %t2, %t3, %t4, %t5, %t6, %t7, %t8, ){
%text = %t1 SPC %t2 SPC %t3 SPC %t4 SPC %t5 SPC %t6 SPC %t7 SPC %t8;
messageboxok(,"","Hello\n" @ %text");
}
Typo comma and space after %t8

Yeah that was a typo i dont have that in the real thing.

Ok. WTF, i gave the mod to Spat so we could play with it and when he tried Ransom he could say more than 4 words and i couldnt.

I'm thinking there's a problem in server commands clientside - in my servers, when I used my bot commands:

/makebot Generic Hello,_everyone.

I got a bot with name "Generic" with the line "Hello, everyone". (due to my code)

When others did the same, they got a bot with name "Generic Hello, everyone" with no line at all.

I think it has somthing to do with one of the versions of IGSO...or something like it (I THINK). It changed it so /commands gave one long variable not all seperate words. So for some people it is different.

So IGSO's is causing the problem?

Okay, well Spat has a version Without the admin tab and i have that version so i think your right Aloshi.

I have IGSO and I have the same error D=

My advice is to edit your own version of http://www.blockland.us/smf/index.php?topic=16921.0 . Be sure to delete instances of getvalue(); ...you don't need it and it'll cause an error.

my own two cents:
I would rather just use /hello to set %client.hello to 1 then when the player says something next it will make %client.hello 0 and do the function with what he said
Code: [Select]
package texthello {
function serverCmdMessageSent(%client, %text)
{
 if(%client.hello)
 {
  messageboxok(,"","Hello\n" @ %text");
  %client.hello = 0;
 }
 else
 {
  Parent::serverCmdMessageSent(%client, %text);
 }
}
function servercmdhello(%client)
{
 %client.hello = 1;
}
};
ActivatePackage(texthello);