Blockland Forums > Modification Help

Announce problem

Pages: << < (2/2)

jouatt:

Works fine.
Thank you.

Now that I got that working..
I set up another code to announce whatever I want.
The problem is that it only displays one word.
Can anyone fix this?


--- Code: ---function serverCmdAnnounce(%client, %text)
{

    if(%client.isSuperadmin)
    {
     announce(%text);
    }   

}
--- End code ---


MegaScientifical:


--- Code: ---function serverCmdAnnounce(%client, %text1, %text2, %text3, %text4, %text5, %text6, %text7, %text8, %text9, %text10)  {

    if(%client.isSuperadmin)
     announce(%text1 @ %text2 @ %text3 @ %text4 @ %text5 @ %text6 @ %text7 @ %text8 @ %text9 @ %text10);
}
--- End code ---

I probably got the syntax wrong, and there might be an easier way, but that's what I have. The problem is that slash commands send each word as a variable... unless you hack it.

jouatt:

It works but whenever I type in "Hello world"
It comes out as "Helloworld"
No space.
Is there a way to fix that?

MegaScientifical:


--- Code: ---function serverCmdAnnounce(%client, %text1, %text2, %text3, %text4, %text5, %text6, %text7, %text8, %text9, %text10)  {

    if(%client.isSuperadmin)
     announce(%text1 SPC %text2 SPC %text3 SPC %text4 SPC %text5 SPC %text6 SPC %text7 SPC %text8 SPC %text9 SPC %text10);
}
--- End code ---


jouatt:


--- Quote from: MegaScientifical on June 24, 2010, 01:16:43 AM ---
--- Code: ---function serverCmdAnnounce(%client, %text1, %text2, %text3, %text4, %text5, %text6, %text7, %text8, %text9, %text10)  {

    if(%client.isSuperadmin)
     announce(%text1 SPC %text2 SPC %text3 SPC %text4 SPC %text5 SPC %text6 SPC %text7 SPC %text8 SPC %text9 SPC %text10);
}
--- End code ---

--- End quote ---

ahh ha.
Thank you sir.

Pages: << < (2/2)

Go to full version