//Counts colour codes to display offsets properly
int count_colour( char *str )
{ char c;
int count = 0;
while ( (c = *str++ ) != '\0' )
{
if(c == '{' || c == '@')
count++;
}
return count*2;
}
int count_colour( char *str )
{
char c;
int count = 0;
while ( (c = *str++ ) != '\0' )
{
if(c == '{' || c == '@')
{
count++;
str++;
}
}
return count*2;
}
int count_colour( char *str )
{ char c;
int count = 0;
while((c = *str++) != '\0')
{
if(c == '{' || c == '@')
{
count++;
str++;
if(*str != '{' || *str != '@')
count++;
}
}
return count;
}
So, I'm using the display grid by Davion for some formatting and I'm running into an issue. My output is looking like this (minus the spaces between the @ symbol:
You can see that it is adding extra spaces and it's because of the code which prevents the "@" symbol from registering as a color. The code is:
I've also got the color code in the grid code modified to allow for the "@" symbol, but it's still off. Can anyone help?
Thanks in advance