Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: Otisao s Foruma! poslato Februar 08, 2012, 19:02:18 POSLE PODNE

Naslov: [Pomoc] /lotto pokretanje.
Poruka od: Otisao s Foruma! poslato Februar 08, 2012, 19:02:18 POSLE PODNE

Skripta koju koristim:FG
Detaljan opis problema: kako da napravim da loto bude svako 1h kada je i plaata pomoc pls.  :'(
Dio skripte: evo komande

if(strcmp(cmd, "/lotto", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pLottoNr] > 0)
        {
            SendClientMessage(playerid, COLOR_GREY, "   Vec imate listic za lotto !");
            return 1;
        }
        if(GetPlayerMoney(playerid) < 50)
        {
            SendClientMessage(playerid, COLOR_GREY, "   Treba vam $50 za lotto listic !");
            return 1;
        }
        tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_WHITE,"Koriscenje: /lotto [number]");
return 1;
}
new lottonr = strval(tmp);
if(lottonr < 1 || lottonr > 80) { SendClientMessage(playerid, COLOR_GREY, "   Lotto broj moze biti od 1 do 80 !"); return 1; }
format(string, sizeof(string), "* Kupili ste listic za lotto sa brojem: %d.", lottonr);
SendClientMessage(playerid, COLOR_WHITE, string);
SafeGivePlayerMoney(playerid, - 50);
PlayerInfo[playerid][pLottoNr] = lottonr;
    }
    return 1;
}
Naslov: Odg: [Pomoc] /lotto pokretanje.
Poruka od: |¤ White ¤| poslato Februar 08, 2012, 19:55:05 POSLE PODNE
ispod public PayDay() dodaj ovo format(string, sizeof(string), "Lutrija: Pocinjemo izvlacenje.");
OOCOff(COLOR_DBLUE, string);
  new rand = random(80);
    if(rand < 77) { rand += 3; }
    Lotto(rand);


EDIT: Javi jel radi !
Naslov: Odg: [Pomoc] /lotto pokretanje.
Poruka od: Otisao s Foruma! poslato Februar 08, 2012, 23:42:20 POSLE PODNE
erori  :'( :'(

C:\Documents and Settings\kk\Desktop\UN\gamemodes\sarajevo.pwn(16218) : error 017: undefined symbol "string"
C:\Documents and Settings\kk\Desktop\UN\gamemodes\sarajevo.pwn(16218) : error 017: undefined symbol "string"
C:\Documents and Settings\kk\Desktop\UN\gamemodes\sarajevo.pwn(16218) : error 029: invalid expression, assumed zero
C:\Documents and Settings\kk\Desktop\UN\gamemodes\sarajevo.pwn(16218) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.


edit ovo je to.

public PayDay()
{
format(string, sizeof(string), "Lutrija: Pocinjemo izvlacenje.");
OOCOff(COLOR_DBLUE, string);
  new rand = random(80);
    if(rand < 77) { rand += 3; }
    Lotto(rand);
Naslov: Odg: [Pomoc] /lotto pokretanje.
Poruka od: caupton poslato Februar 08, 2012, 23:43:38 POSLE PODNE
new string[65]; stavi bolje

newstring[60];
Naslov: Odg: [Pomoc] /lotto pokretanje.
Poruka od: Otisao s Foruma! poslato Februar 08, 2012, 23:52:11 POSLE PODNE
gdje trebam to?
Naslov: Odg: [Pomoc] /lotto pokretanje.
Poruka od: vlado_plavsic poslato Februar 09, 2012, 00:01:16 PRE PODNE
Citat: ¢fg:) poslato Februar 08, 2012, 23:52:11 POSLE PODNE
gdje trebam to?

Iznad toga.Definises string koji ces da koristis dole.
Naslov: Odg: [Pomoc] /lotto pokretanje.
Poruka od: Otisao s Foruma! poslato Februar 09, 2012, 00:05:04 PRE PODNE
public PayDay()
{
newstring[60];
format(string, sizeof(string), "Lutrija: Pocinjemo izvlacenje.");
   OOCOff(COLOR_DBLUE, string);
     new rand = random(80);
      if(rand < 77) { rand += 3; }
    Lotto(rand);

jeli ovako treba_?
Naslov: Odg: [Pomoc] /lotto pokretanje.
Poruka od: Nxidza poslato Februar 09, 2012, 00:17:20 PRE PODNE
Citat: ¢fg:) poslato Februar 09, 2012, 00:05:04 PRE PODNE
public PayDay()
{
newstring[60];
format(string, sizeof(string), "Lutrija: Pocinjemo izvlacenje.");
   OOCOff(COLOR_DBLUE, string);
     new rand = random(80);
      if(rand < 77) { rand += 3; }
    Lotto(rand);

jeli ovako treba_?
Sta mislis o tome da kompajlas i vidis?DA TAKO !
Naslov: Odg: [Pomoc] /lotto pokretanje.
Poruka od: Otisao s Foruma! poslato Februar 09, 2012, 00:23:13 PRE PODNE
ubacim i ovo  :'( :'(

C:\Documents and Settings\kk\Desktop\UN\gamemodes\sarajevo.pwn(16190) : error 017: undefined symbol "newstring"
C:\Documents and Settings\kk\Desktop\UN\gamemodes\sarajevo.pwn(16190) : warning 215: expression has no effect
C:\Documents and Settings\kk\Desktop\UN\gamemodes\sarajevo.pwn(16190) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\kk\Desktop\UN\gamemodes\sarajevo.pwn(16190) : error 029: invalid expression, assumed zero
C:\Documents and Settings\kk\Desktop\UN\gamemodes\sarajevo.pwn(16190) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Naslov: Odg: [Pomoc] /lotto pokretanje.
Poruka od: Nxidza poslato Februar 09, 2012, 00:25:49 PRE PODNE
Citat: ¢fg:) poslato Februar 09, 2012, 00:23:13 PRE PODNE
ubacim i ovo  :'( :'(

C:\Documents and Settings\kk\Desktop\UN\gamemodes\sarajevo.pwn(16190) : error 017: undefined symbol "newstring"
C:\Documents and Settings\kk\Desktop\UN\gamemodes\sarajevo.pwn(16190) : warning 215: expression has no effect
C:\Documents and Settings\kk\Desktop\UN\gamemodes\sarajevo.pwn(16190) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\kk\Desktop\UN\gamemodes\sarajevo.pwn(16190) : error 029: invalid expression, assumed zero
C:\Documents and Settings\kk\Desktop\UN\gamemodes\sarajevo.pwn(16190) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

Boze pomozi mi,pa kad vec dajes errore daj i liniju nmg ja da ti vadim iz moda ! -.-
Naslov: Odg: [Pomoc] /lotto pokretanje.
Poruka od: |¤ White ¤| poslato Februar 09, 2012, 00:42:19 PRE PODNE
evo ti pocetak payday pronadji kod tebe i zameni public PayDay()
{

    new string[128];
new account,interest;
new rent = 0;
format(string, sizeof(string), "Lutrija: Pocinjemo izvlacenje.");
OOCOff(COLOR_DBLUE, string);
  new rand = random(80);
    if(rand < 77) { rand += 3; }
    Lotto(rand);
foreach (Player, i)
{
    if(PlayerInfo[i][pLevel] > 0)
    {
    if(MoneyMessage[i]==1)
{
    SendClientMessage(i, COLOR_LIGHTRED, "Niste uspjeli da vratite dug, idete u zatvor.");
    GameTextForPlayer(i, "~r~Uhapsen!", 2000, 1);


PS. Isto koristim Faction Game
Naslov: Odg: [Pomoc] /lotto pokretanje.
Poruka od: Otisao s Foruma! poslato Februar 09, 2012, 01:07:09 PRE PODNE
hvala ti kraljuuuuuuuuuuuuuuuuuuuuuu radi perfektno :D :D  ;)

moze lock.