SA-MP Forums Archive
[HELP] warning 215: expression has no effect - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] warning 215: expression has no effect (/showthread.php?tid=580414)



[HELP] warning 215: expression has no effect - Sensation - 05.07.2015

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;
    }



Re: [HELP] warning 215: expression has no effect - fuckingcruse - 05.07.2015

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;
		
	}



Re: [HELP] warning 215: expression has no effect - Sensation - 05.07.2015

I'm sorry. More warnings and errors..


Re: [HELP] warning 215: expression has no effect - Yashas - 05.07.2015

What is the warning?

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



Re: [HELP] warning 215: expression has no effect - Sensation - 05.07.2015

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.