13.06.2016, 19:38
Fixed.
anther problem: in OnPlayerRequstClass
errors:
I think my Pawn bugged or something... why the errors only at case 0 and case 1??
anther problem: in OnPlayerRequstClass
PHP код:
public OnGameModeInit()
{
SetGameModeText("Mini Games Script");
AddPlayerClass(2 , 1628.6528,-2290.0068,94.1270,215.9542, 24,9999, 26, 9999,28, 9999); //Case 0 .
AddPlayerClass(264, 1210.7349,-2036.7631,69.0078,270.1496, 24,9999, 26, 9999,28, 9999);//Case 1 .
AddPlayerClass(102, 2111.3210,1258.4351,10.8203,107.3569, 24,9999, 26, 9999,28, 9999);//Case 2
AddPlayerClass(102, 2112.4336,1152.0609,13.5166,61.5863, 24,9999, 26, 9999,28, 9999);//Case 3
AddPlayerClass(115, -1383.6305,680.5055,84.0078,188.0059, 24,9999, 26, 9999,28, 9999);//Case 4
AddPlayerClass(268, -1544.6187,699.6717,148.2734,247.4590, 24,9999, 26, 9999,28, 9999);//Case 5
AddPlayerClass(138, -1544.6187,699.6717,148.2734,247.4590, 24,9999, 26, 9999,28, 9999);//Case 6
AddPlayerClass(154, 2230.8042,-2460.3716,61.6104,279.1390, 24,9999, 26, 9999,28, 9999);//Case 7
AddPlayerClass(195, 1472.3932,-2286.8137,42.0187,90.4601, 24,9999, 26, 9999,28, 9999);//Case 8
AddPlayerClass(85 , 1822.1333,-1682.5481,13.3828,88.4118, 24,9999, 26, 9999,28, 9999);//Case 9
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
switch(classid) {
case 0:
SetPlayerPos(playerid,1628.6528,-2290.0068,94.1270,215.9542);
SetPlayerCameraPos(playerid, 1628.6528,-2290.0068,94.1270,215.9542);
SetPlayerCameraLookAt(playerid,1628.6528,-2290.0068,94.1270,215.9542);
case 1:
SetPlayerPos(playerid,1210.7349,-2036.7631,69.0078,270.1496);
SetPlayerCameraPos(playerid, 1210.7349,-2036.7631,69.0078,270.1496);
SetPlayerCameraLookAt(playerid,1210.7349,-2036.7631,69.0078,270.1496);
case 2:
SetPlayerPos(playerid,2111.3210,1258.4351,10.8203,107.3569);
SetPlayerCameraPos(playerid,2111.3210,1258.4351,10.8203,107.3569);
SetPlayerCameraLookAt(playerid,2111.3210,1258.4351,10.8203,107.3569);
case 3:
SetPlayerPos(playerid,2112.4336,1152.0609,13.5166,61.5863);
SetPlayerCameraPos(playerid,2112.4336,1152.0609,13.5166,61.5863);
SetPlayerCameraLookAt(playerid,2112.4336,1152.0609,13.5166,61.5863);
case 4:
SetPlayerPos(playerid,-1383.6305,680.5055,84.0078,188.0059 );
SetPlayerCameraPos(playerid, -1383.6305,680.5055,84.0078,188.0059);
SetPlayerCameraLookAt(playerid,-1383.6305,680.5055,84.0078,188.0059 );
case 5:
SetPlayerPos(playerid,-1544.6187,699.6717,148.2734,247.4590 );
SetPlayerCameraPos(playerid,-1544.6187,699.6717,148.2734,247.4590 );
SetPlayerCameraLookAt(playerid,-1544.6187,699.6717,148.2734,247.4590 );
case 6:
SetPlayerPos(playerid,-1544.6187,699.6717,148.2734,247.4590 );
SetPlayerCameraPos(playerid,-1544.6187,699.6717,148.2734,247.4590 );
SetPlayerCameraLookAt(playerid, -1544.6187,699.6717,148.2734,247.4590);
case 7:
SetPlayerPos(playerid,2230.8042,-2460.3716,61.6104,279.1390 );
SetPlayerCameraPos(playerid,2230.8042,-2460.3716,61.6104,279.1390 );
SetPlayerCameraLookAt(playerid, 2230.8042,-2460.3716,61.6104,279.1390);
case 8:
SetPlayerPos(playerid,1472.3932,-2286.8137,42.0187,90.4601 );
SetPlayerCameraPos(playerid,1472.3932,-2286.8137,42.0187,90.4601 );
SetPlayerCameraLookAt(playerid, 1472.3932,-2286.8137,42.0187,90.4601);
case 9:
SetPlayerPos(playerid,1822.1333,-1682.5481,13.3828,88.4118 );
SetPlayerCameraPos(playerid,1822.1333,-1682.5481,13.3828,88.4118 );
SetPlayerCameraLookAt(playerid, 1822.1333,-1682.5481,13.3828,88.4118);
}
}
PHP код:
E:\GTA\gamemodes\mg.pwn(68) : warning 202: number of arguments does not match definition
E:\GTA\gamemodes\mg.pwn(69) : error 002: only a single statement (or expression) can follow each "case"
E:\GTA\gamemodes\mg.pwn(69) : warning 215: expression has no effect
E:\GTA\gamemodes\mg.pwn(70) : warning 213: tag mismatch
E:\GTA\gamemodes\mg.pwn(71) : warning 217: loose indentation
E:\GTA\gamemodes\mg.pwn(71) : error 014: invalid statement; not in switch
E:\GTA\gamemodes\mg.pwn(71) : warning 215: expression has no effect
E:\GTA\gamemodes\mg.pwn(71) : error 001: expected token: ";", but found ":"
E:\GTA\gamemodes\mg.pwn(71) : error 029: invalid expression, assumed zero
E:\GTA\gamemodes\mg.pwn(71) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.