Random command
#1

So, I made a command:

Код:
dcmd_war(playerid,params[]) {
	#pragma unused params
	{
	if(InWar[playerid] != 1) return SendClientMessage(playerid, red, "ERROR: You are currently in a DM zone! Type /exit to leave it!");
	if(Dead[playerid] != 1) return SendClientMessage(playerid, red, "ERROR: You must spawn before teleporting to DM zone!");
 	else
		new tmp3; tmp3=random(7); //1139 line
    	switch(tmp3)
    	{
    	    case 0: { SendClientMessage(playerid,green,"1"); }
    	    case 1: { SendClientMessage(playerid,green,"2"); }
    	    case 2: { SendClientMessage(playerid,green,"3"); }
    	    case 3: { SendClientMessage(playerid,green,"4"); }
    	    case 4: { SendClientMessage(playerid,green,"5"); }
    	    case 5: { SendClientMessage(playerid,green,"6"); }
    	    case 6: { SendClientMessage(playerid,green,"7"); }
		}
		return 1;
	}
	return 0;
}
And the problem is:

...(1139) : warning 217: loose indentation
...(1139) : error 017: undefined symbol "tmp5"
...(1139) : warning 215: expression has no effect
...(1139) : error 017: undefined symbol "tmp5"
...(1139) : fatal error 107: too many error messages on one line

Anyone can help me and fix it?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)