16.04.2009, 20:25
pawn Код:
if (!strcmp (cmdtext,"/dm1", true))
{
new RandomSpawn;
RandomSpawn = random(12);
switch (RandomSpawn)
{
if(RandomSpawn == 0)
{
SetPlayerPos(playerid,2626.7993,2711.6313,36.5386);
SetPlayerFacingAngle(playerid,40.9613);
}
if(RandomSpawn == 1)
{
SetPlayerPos(playerid,2618.1277,2777.4395,23.8222);
SetPlayerFacingAngle(playerid,113.3420);
}
if(RandomSpawn == 2)
{
SetPlayerPos(playerid,2597.7422,2756.1919,23.8222);
SetPlayerFacingAngle(playerid,269.0701);
}
if(RandomSpawn == 3)
{
SetPlayerPos(playerid,2610.8132,2709.1794,25.8222);
SetPlayerFacingAngle(playerid,258.6882);
}
if(RandomSpawn == 4)
{
SetPlayerPos(playerid,2641.9697,2703.7573,25.8222);
SetPlayerFacingAngle(playerid,350.5166);
}
if(RandomSpawn == 5)
{
SetPlayerPos(playerid,2649.1890,2733.6533,10.8203);
SetPlayerFacingAngle(playerid,343.9342);
}
if(RandomSpawn == 6)
{
SetPlayerPos(playerid,2666.5576,2691.5994,10.8203);
SetPlayerFacingAngle(playerid,28.6762);
}
if(RandomSpawn == 7)
{
SetPlayerPos(playerid,2668.2385,2780.0132,10.8203);
SetPlayerFacingAngle(playerid,57.9209);
}
if(RandomSpawn == 8)
{
SetPlayerPos(playerid,2646.6970,2804.0791,10.8203);
SetPlayerFacingAngle(playerid,112.7547);
}
if(RandomSpawn == 9)
{
SetPlayerPos(playerid,2611.2395,2811.6638,10.8203);
SetPlayerFacingAngle(playerid,28.6762);
}
if(RandomSpawn == 10)
{
SetPlayerPos(playerid,2666.5576,2691.5994,10.8203);
SetPlayerFacingAngle(playerid,66.9868);
}
if(RandomSpawn == 11)
{
SetPlayerPos(playerid,2593.1904,2807.6956,10.8203);
SetPlayerFacingAngle(playerid,52.3644);
}
return 1;
}
i get:
Код:
E:\Spel\Sa-mp Server\gamemodes\skipcast-stunting.pwn(948) : error 002: only a single statement (or expression) can follow each "case" E:\Spel\Sa-mp Server\gamemodes\skipcast-stunting.pwn(948 -- 949) : error 029: invalid expression, assumed zero E:\Spel\Sa-mp Server\gamemodes\skipcast-stunting.pwn(1084) : warning 203: symbol is never used: "strtok" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.