[HELP] warning 215: expression has no effect
#1

I got this warning on this lines:

pawn Код:
for(new i = 0;i < MAX_MAPS; i++)
    {
        if(!m_info[i][mLoaded])continue;
        if(g == 1)strcat(dstr, "\n");
        ((i+1) % 2) ? strcat(dstr, "{00f0f0}") : strcat(dstr, "{f0f000}");//Warning at this line
        strcat(dstr, m_info[i][mName]);
        g = 1;
    }


and

for(new i = 0; i < rows; i++)
    {
        cache_get_row(i, 0, temp, db);
        if(GetSlot(temp) != -1)continue;
        ((i+1) % 2) ? strcat(dstr, "{00f0f0}") : strcat(dstr, "{f0f000}");//Warning at this line
        strcat(dstr, temp);
        if(i < rows-1)strcat(dstr, "\n");
        g = 1;
    }
Reply
#2

Try this
Код:
	for(new i = 0;i < MAX_MAPS; i++)
	{
	    if(!m_info[i][mLoaded])continue
	    {
	    	if(g == 1)strcat(dstr, "\n")
   			{
			   	((i+1) % 2) ? strcat(dstr, "{00f0f0}") : strcat(dstr, "{f0f000}");//Warning at this line
				strcat(dstr, m_info[i][mName]);
	    		g = 1;
			}
		}
  	}




for(new i = 0; i < rows; i++)
   	{
   	    cache_get_row(i, 0, temp, db);
   	    if(GetSlot(temp) != -1)continue;
		{
			((i+1) % 2) ? strcat(dstr, "{00f0f0}") : strcat(dstr, "{f0f000}");//Warning at this line
			strcat(dstr, temp);
		}
		else if(i < rows-1)strcat(dstr, "\n") return g = 1;
		
	}
Reply
#3

I'm sorry. More warnings and errors..
Reply
#4

What is the warning?

Try this
Код:
if( (i+1) % 2) strcat(dstr, "{00f0f0}");
else strcat(dstr, "{f0f000}");
Reply
#5

Quote:
Originally Posted by Yashas
Посмотреть сообщение
What is the warning?

Try this
Код:
if( (i+1) % 2) strcat(dstr, "{00f0f0}");
else strcat(dstr, "{f0f000}");
Problem solved. Thank you so much.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)