помогите исправить ошибки
#1

Код:
D:\Games\SAMP сервер\SampDM\gamemodes\SampDM.pwn(384) : error 017: undefined symbol "PlayAudioStreamForPlayer"
D:\Games\SAMP сервер\SampDM\gamemodes\SampDM.pwn(384) : error 002: only a single statement (or expression) can follow each "case"
D:\Games\SAMP сервер\SampDM\gamemodes\SampDM.pwn(384) : error 029: invalid expression, assumed zero
D:\Games\SAMP сервер\SampDM\gamemodes\SampDM.pwn(384) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Вот паблик

Код:
public OnPlayerConnect(playerid) {
new message[127];
SendClientMessage(playerid,COLOR_YELLOW,">Для помощи введите /help // Обязательно прочтите правила /rules");
GivePlayerMoney(playerid, 10000);
GetPlayerName(playerid, message, sizeof(message));
format(message,sizeof(message), "%s (ID: %d) зашел на сервер", message, playerid);
switch(MusicTimer){
case 0: PlayAudioStreamForPlayer(playerid,"http://hht-clan.ucoz.com/mp3/skripta_bitbass.mp3"); MusicTimer = 1; SetTimerEx("StopMusic",MAX_CONNECT_MUSIC * 1000,0,"i",playerid);
case 1: PlayAudioStreamForPlayer(playerid,"http://hht-clan.ucoz.com/mp3/skripta_bitbass.mp3"); MusicTimer = 2; SetTimerEx("StopMusic",MAX_CONNECT_MUSIC * 1000,0,"i",playerid);
case 2: PlayAudioStreamForPlayer(playerid,"http://hht-clan.ucoz.com/mp3/skripta_bitbass.mp3"); MusicTimer = 0; SetTimerEx("StopMusic",MAX_CONNECT_MUSIC * 1000,0,"i",playerid);
}
for(new i = 0; i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i) && playerid != i) {
SendClientMessage(i, NEW_COLOR, message);
}
}
}
Reply
#2

case 0: {...}
case 1: {...}
case 2: {...}
Reply
#3

у меня не получается
Reply
#4

скачайте сервер 0.3d(Windows\Linux) и компилируйте с новыми инклудами
Reply
#5

скачал,установил,все заменил при компилировании мода теперь вот такие ошибки
Код:
D:\Games\SAMP сервер\SampDM\gamemodes\SampDM.pwn(418) : error 002: only a single statement (or expression) can follow each "case"
D:\Games\SAMP сервер\SampDM\gamemodes\SampDM.pwn(418) : error 029: invalid expression, assumed zero
D:\Games\SAMP сервер\SampDM\gamemodes\SampDM.pwn(418) : warning 215: expression has no effect
D:\Games\SAMP сервер\SampDM\gamemodes\SampDM.pwn(419) : error 014: invalid statement; not in switch
D:\Games\SAMP сервер\SampDM\gamemodes\SampDM.pwn(419) : warning 215: expression has no effect
D:\Games\SAMP сервер\SampDM\gamemodes\SampDM.pwn(419) : error 001: expected token: ";", but found ":"
D:\Games\SAMP сервер\SampDM\gamemodes\SampDM.pwn(419) : error 029: invalid expression, assumed zero
D:\Games\SAMP сервер\SampDM\gamemodes\SampDM.pwn(419) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Reply
#6

теперь сделайте как ziggi писал, без фигурных скобок в такой ситуации можно только одну функцию выполнить
Reply
#7

так?
Код:
case 0: {PlayAudioStreamForPlayer}(playerid,"http://hht-clan.ucoz.com/mp3/skripta_bitbass.mp3"); MusicTimer = 1; SetTimerEx("StopMusic",MAX_CONNECT_MUSIC * 1000,0,"i",playerid);
case 1: {PlayAudioStreamForPlayer}(playerid,"http://hht-clan.ucoz.com/mp3/skripta_bitbass.mp3"); MusicTimer = 2; SetTimerEx("StopMusic",MAX_CONNECT_MUSIC * 1000,0,"i",playerid);
case 2: {PlayAudioStreamForPlayer}(playerid,"http://hht-clan.ucoz.com/mp3/skripta_bitbass.mp3"); MusicTimer = 0; SetTimerEx("StopMusic",MAX_CONNECT_MUSIC * 1000,0,"i",playerid);
Reply
#8

pawn Код:
case 0:{ PlayAudioStreamForPlayer(playerid,"http://hht-clan.ucoz.com/mp3/skripta_bitbass.mp3"); MusicTimer = 1; SetTimerEx("StopMusic",MAX_CONNECT_MUSIC * 1000,0,"i",playerid);}
case 1:{ PlayAudioStreamForPlayer(playerid,"http://hht-clan.ucoz.com/mp3/skripta_bitbass.mp3"); MusicTimer = 2; SetTimerEx("StopMusic",MAX_CONNECT_MUSIC * 1000,0,"i",playerid);}
case 2:{ PlayAudioStreamForPlayer(playerid,"http://hht-clan.ucoz.com/mp3/skripta_bitbass.mp3"); MusicTimer = 0; SetTimerEx("StopMusic",MAX_CONNECT_MUSIC * 1000,0,"i",playerid);}
Reply
#9

Quote:
Originally Posted by [HHT]DRON
Посмотреть сообщение
так?
Код:
case 0: {PlayAudioStreamForPlayer}(playerid,"http://hht-clan.ucoz.com/mp3/skripta_bitbass.mp3");
Вам явно нужен форум попроще с такими познаниями...
Reply
#10

Quote:

case 0: {PlayAudioStreamForPlayer}(playerid,"http://hht-clan.ucoz.com/mp3/skripta_bitbass.mp3");

Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)