Switch problem
#1

Код:
	if (strcmp("/zonaww", cmdtext, true, 10) == 0)
	{
	BloqueoDeComandos[playerid] = 1;
	SetPlayerVirtualWorld(playerid, 2);
	SetPlayerInterior(playerid, 1);
	switch (telesww)
	{
    case 0: {SetPlayerPos(playerid, 1412.639892,-1.787510,1000.924377); }
    case 1: {SetPlayerPos(playerid, 1360.1567,4.4784,1000.9219); }
    case 2: {SetPlayerPos(playerid, 1360.0837,5.7613,1008.1563); }
    case 3: {SetPlayerPos(playerid, 1392.2203,-34.4082,1007.8815); }
    case 4: {SetPlayerPos(playerid, 1417.7954,-47.1087,1007.8936); }
    case 5: {SetPlayerPos(playerid, 1416.8197,5.9778,1007.8885); }
    }
	GivePlayerWeapon(playerid, 24, 999999);
	GivePlayerWeapon(playerid, 27, 999999);
	GivePlayerWeapon(playerid, 29, 999999);
	GivePlayerWeapon(playerid, 31, 999999);
	GivePlayerWeapon(playerid, 34, 999999);
	return 1;
	}
Error:
Код:
: error 017: undefined symbol "telesww"
Reply
#2

Where is "telesww" declared?
Reply
#3

I not declared nothing
Reply
#4

Quote:
Originally Posted by MrTostada
Посмотреть сообщение
I not declared nothing
The problem is you haven't declared what is "telesww". You need to declare it first. And then, say when player executes a command, give them the value of the telesww, and after that you can do switch-cases.
Reply
#5

https://sampforum.blast.hk/showthread.php?tid=622393
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)