SA-MP Forums Archive
invalid statement; not in switch - 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: invalid statement; not in switch (/showthread.php?tid=416018)



invalid statement; not in switch - Arnoo - 15.02.2013

Hey im trying to make a grafitti system.
This is what I got.
Now this is just a piece of code
but the error is in line 6046.

Код:
	if(dialogid == 421 && response)
	{
		case 0;
		{
		new tag1;
		tag1 = CreateObject(19371, -2494.41, 2295.63, 5.66,   0.00, 0.00, 269.98);
		SetObjectMaterialText(tag1, inputtext, 0, OBJECT_MATERIAL_SIZE_256x128,\"Arial", 50, 0, 0xFFFF8200, 0x000000AA, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
        PlayerPlaySound(playerid, 1134, 0.0, 0.0, 10.0);
		}
	}
Thanks


Re: invalid statement; not in switch - emokidx - 15.02.2013

I think the error says it all. the cases arn't in the switch statement.
But wait.. why is there a case inside the dialog!?
Delete the case 0. It isn't doing anything as far as I can see.