Problem on possibly unintended assignment...
#1

I don't see any problem on this code, but it still says:

warning 211: possibly unintended assignment, line if (answr = "No")
error 006: must be assigned to an array, line if (answr = "No")
warning 204: symbol is assigned a value that is never used: "answr", lol? I am dunno about this..

Код:
	// Lisence driving... part 3
	if(dialogid == 1+1)
	{
		if(response)
		{
			if(listitem == 0)
			{
			new answr = strval(inputtext);
			if (answr = "No")
			{
			CarSchool[playerid] = CarSchool[playerid]+1;
			}
			}
			if(listitem == 1)
			{
			}
		}
		return 1;
	}
Reply
#2

You converted string to integer and then compare this integer to string... This cant work... I made new example.
Код:
	// Lisence driving... part 3
	if(dialogid == 1+1)
	{
		if(response)
		{
			if(listitem == 0)
			{
			if (!strcmp(inputtext,"No",true))
			{
			CarSchool[playerid] = CarSchool[playerid]+1;
			}
			}
			if(listitem == 1)
			{
			}
		}
		return 1;
	}
Reply
#3

Quote:
Originally Posted by MummyKillerSLO
You converted string to integer and then compare this integer to string... This cant work... I made new example.
Oh yeah of coarse
Thanks.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)