Creeperen
Новичок
Тут компилятор ругается вот взгляните.
Ошибки:
P.S: В первый раз пользуюсь рандом системой
PHP:
CMD:usebronsekeysone(playerid)
{
if(!PTEMP[playerid][pLogin]) return true;
if(PTEMP[playerid][pCash] < 10000) return SendClientMessage(playerid,COLOR_RED,"У вас не достаточно виртов");
PTEMP[playerid][pCash] -= 10000;
switch(random(13))
{
case 0..1:
PTEMP[playerid][pCash] += 7000;
SendClientMessage(playerid, COLOR_GOLD, "Вы открыли Bronse кейс и получили 7000$");
case 2..3:
PTEMP[playerid][pCash] += 8000;
SendClientMessage(playerid, COLOR_GOLD, "Вы открыли Bronse кейс и получили 8000$");
case 4..5:
PTEMP[playerid][pCash] += 9500;
SendClientMessage(playerid, COLOR_GOLD, "Вы открыли Bronse кейс и получили 9500$");
case 6..7:
PTEMP[playerid][pCash] += 11000;
SendClientMessage(playerid, COLOR_GOLD, "Вы открыли Bronse кейс и получили 11000$");
case 8..9:
PTEMP[playerid][pCash] += 14000;
SendClientMessage(playerid, COLOR_GOLD, "Вы открыли Bronse кейс и получили 14000$");
case 10..11:
PTEMP[playerid][pCash] += 19900;
SendClientMessage(playerid, COLOR_GOLD, "Вы открыли Bronse кейс и получили 1990$");
case 12..13:
PTEMP[playerid][pCash] += 24000;
SendClientMessageToAll(COLOR_GOLD, "%s открыл Bronse кейс и получил 24000$" Name(playerid));
}
return 1;
}
PHP:
C:\Users\Рома\Desktop\samp-rp\gamemodes\srp.pwn(24747) : error 002: only a single statement (or expression) can follow each "case"
C:\Users\Рома\Desktop\samp-rp\gamemodes\srp.pwn(24747) : warning 215: expression has no effect
C:\Users\Рома\Desktop\samp-rp\gamemodes\srp.pwn(24748) : error 014: invalid statement; not in switch
C:\Users\Рома\Desktop\samp-rp\gamemodes\srp.pwn(24748) : warning 215: expression has no effect
C:\Users\Рома\Desktop\samp-rp\gamemodes\srp.pwn(24748) : error 001: expected token: ";", but found ".."
C:\Users\Рома\Desktop\samp-rp\gamemodes\srp.pwn(24748) : error 029: invalid expression, assumed zero
C:\Users\Рома\Desktop\samp-rp\gamemodes\srp.pwn(24748) : fatal error 107: too many error messages on one line
