Well thanks for the contribution!
There are some bugs, for example this function:
Code:
var cltext_valid_cltag(STRING *text, var pos)



I recoded it so it wont crash:
Code:
var cltext_valid_cltag(STRING *text, var pos)
{
	if (pos > (str_len(text)-10)) return 5;
	
	var res = 0;
	if(str_getchr(text, pos+1) != '[') res++;
	if(str_getchr(text, pos+2) != 'c') res++;
	if(str_getchr(text, pos+3) != 'l') res++;
	if(str_getchr(text, pos+10) != ']') res++;
	
	return res;
}



I tried to make a function to add new text and it worked just fine, but Ive got a problem. I wanted to use this for my chat but "\n" dont move other text elements down and I didnt know how to fix that..
Any ideas?