Jump to content

Remove extra space when using command ingame


Go to solution Solved by Metin2 Dev,

Recommended Posts

  • Active+ Member

Hello guys,

is here someone who knows how can I remove extra space between command and value? When I use: /n, /b, etc. written text is moved to the right side by one space because you must do the space between command and value. Example: /n Hello world. As you can see between /n and Hello world  is one extra space which is moving the text in game chat to the right side. Quests don't have this problem because commands are called directly without any extra spaces.

I will be glad for your answers!

Sincerely,

ReFresh

Edited by ReFresh

I'll be always helpful!  😉

Link to comment
https://metin2.dev/topic/27737-remove-extra-space-when-using-command-ingame/
Share on other sites

  • Active+ Member

@Abel(Tiger) Thanks so much for answer! It works.

On 8/18/2021 at 12:02 PM, Abel(Tiger) said:

Be careful though, that +1 should not be done without a size check.

What does it mean? I don't understand about what you're talking.

Oh, I see now something what wasn't there before when I wrote the command without a value, is that some problem or?

Edited by ReFresh

I'll be always helpful!  😉

  • Bot
  • Solution

It get's random stuff from the memory but because it's a gm command don't stress about it. But if you really want that gone try a lenght check:

ACMD(do_notice)
{
	if(strlen(argument) < 2)
		return;
	
	BroadcastNotice(argument + 1);
}

 

  • Love 1

english_banner.gif

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.