Im trying to put this code.
#1

Hi,i'm trying to put this code on my gamemode.

new
string[180] ,i;
strcat(string,text);
while(string[i])
{
if((string[i] == '*' && string[i+1] != '*')||(string[i] == '-' && string[i+1] != '-'))
{
strdel(string,i,i+1);
strins(string,"{FA7E7D}",i);
}
i++;
}

But after compiling i get tons of error on almost all lines saying "local variable "i" shadows a variable at a preceding level " ,etc. Thanks for reading.
Reply
#2

From what i see it should be something like:

PHP код:
stock SomeName(text[])
{
new
string[180] ,i;
strcat(string,text);
while(
string[i])
{
if((
string[i] == '*' && string[i+1] != '*')||(string[i] == '-' && string[i+1] != '-'))
{
strdel(string,i,i+1);
strins(string,"{FA7E7D}",i);
}
i++;
}

Reply
#3

Hello, it compile right. The problem i think , its not working. i want to do this, when you write " Hello how are you *looking into his eyes* " that part want to be in color , its for roleplay.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)