pomoc = hitno molim vas

Započeo Ante_Dracar aka Lopa, Avgust 07, 2010, 14:32:24 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

ovako treba mi pomoc oko credita evo pogledajte pokaziva mi erroere...

new Credit[MAX_PLAYERS];
new BankString[128];




public OnFilterScriptInit()
{
        SetTimer("CreditPayBack", 300000, 1);
         return 1;
}


public OnPlayerConnect(playerid)
        {
        SetTimer("CreditPayBack", 5000, 1);
        new PlayerName[24];
        GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
        if(dini_Exists(udb_encode(PlayerName)))
        {
            Credit[playerid] = dini_Int(udb_encode(PlayerName), "Credit");
            GivePlayerMoney(playerid, Credit[playerid]);
            if(Credit[playerid] == 0)
            {
                SendClientMessage(playerid, COLOR_GREEN, "Vi ne mozete imati bilo koji zajam Kreditne Zbog Bank of Trust");
            }
            else
            {
                format(BankString, sizeof(BankString), "Vi ipak morati vratiti %d$ kredita kreditne", Credit[playerid]);
                SendClientMessage(playerid, COLOR_RED, BankString);
            }
        }
        return 1;
        }


public OnPlayerDisconnect(playerid)
        {
        new PlayerName[24];
        GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
        dini_IntSet(udb_encode(PlayerName), "Credit", Credit[playerid]);
        }


forward LoanPayOff();

public LoanPayOff()
        {
       for(new i = 0; i < MAX_PLAYERS; i ++)
       {
           if(Credit[i] > 0)
           {
       new thing = random(5);
       if(thing == 1)
       {
       new amount = Credit[i]/7;
           format(BankString, sizeof(BankString), "Banka je Pissed, je trebalo %d$ vaÅ¡eg Credit Loan leÄ'a",         amount);
       SendClientMessage(i, COLOR_RED, BankString);
       format(BankString, sizeof(BankString), "~r~Loan -%d$", amount);
       GameTextForPlayer(i, BankString, 3000, 1);
       GivePlayerMoney(i, -amount);
       Credit[i] -= amount;
       }
       else
       {
       SendClientMessage(i, 0xFFFFFF, "Banka želi da njezin kredit nazad!");
       }
       }
       }
       }



public OnPlayerCommandText(playerid, cmdtext[])
{
   new cmd[256], idx;
cmd = strtok(cmdtext, idx);

   if (strcmp("/Creditdue", cmdtext, true, 11) == 0)
{
   format(BankString, sizeof(BankString), "Iznos VaÅ¡e kreditne trenutno je: %d$", Credit[playerid]);
SendClientMessage(playerid, COLOR_YELLOW, BankString);
return 1;
}
if (strcmp("/Credit", cmdtext, true, 5) == 0)
{
new tmp[255];
       tmp = strtok(cmdtext, idx);
       new amount = strval(tmp);
       if(!amount)
{
SendClientMessage(playerid, COLOR_RED, "Neispravan iznosa transakcije");
return 1;
}
       else if(Credit[playerid] > 0)
       {
           format(BankString, sizeof(BankString), "Vi već imate kredit od: %d$", Credit[playerid]);
        SendClientMessage(playerid, COLOR_RED , BankString);
       }
       else
       {
        SendClientMessage(playerid, COLOR_GREEN , "UspjeÅ¡no je uzeo kredit kredit, koristite / creditdue Da biste vidjeli koliko vam je potrebno pripisana i vratiti / creditpay za doigravanje");
        format(BankString, sizeof(BankString), "~y~Loan %d$", amount);
GameTextForPlayer(playerid, BankString, 3000, 1);
        GivePlayerMoney(playerid, amount);
        Credit[playerid] = amount;
}
return 1;
}
if (strcmp("/creditpay", cmdtext, true, 5) == 0)
{
new tmp[255];
       tmp = strtok(cmdtext, idx);
       new amount = strval(tmp);
       if(!amount)
{
SendClientMessage(playerid, COLOR_RED, "Neispravan iznosa transakcije");
return 1;
}
       else if(amount > Credit[playerid])
       {
           format(BankString, sizeof(BankString), "Te licemjerje povrata viÅ¡e od VaÅ¡e najviÅ¡e kredita, Å¡to je %d$", Credit[playerid]);
        SendClientMessage(playerid, COLOR_RED , BankString);
       }
       else if(amount < GetPlayerMoney(playerid))
       {
           format(BankString, sizeof(BankString), "UspjeÅ¡no isplaćena VaÅ¡ kredit od %d$, VaÅ¡ novi iznos kredita je %d$", amount, Credit[playerid]-amount);
        SendClientMessage(playerid, COLOR_YELLOW , BankString);
        format(BankString, sizeof(BankString), "~r~-Loan %d$", amount);
GameTextForPlayer(playerid, BankString, 3000, 1);
        GivePlayerMoney(playerid, -amount);
        Credit[playerid] = Credit[playerid]-amount;
        if(Credit[playerid] == 0)
        {
               SendClientMessage(playerid, COLOR_GREEN , "Banka je zahvaljujemo za VaÅ¡u kreditnu doigravanje");
           }
}
else
{
        SendClientMessage(playerid, COLOR_RED , "Vam ne mogu se isplatiti viÅ¡e nego imate u novčaniku");
       }
return 1;
}
return 0;
}





Poslednja Izmena: Avgust 07, 2010, 14:33:49 POSLE PODNE od Ante_Dracar aka Lopa

a da stavis te errore ?
Little Devil will burn you

C:\Users\Bill Gates\Desktop\ante desktop\New Folder (2)\CroMafia\gamemodes\cmr.pwn(2174) : error 017: undefined symbol "dini_Exists"
C:\Users\Bill Gates\Desktop\ante desktop\New Folder (2)\CroMafia\gamemodes\cmr.pwn(2176) : error 017: undefined symbol "dini_Int"
C:\Users\Bill Gates\Desktop\ante desktop\New Folder (2)\CroMafia\gamemodes\cmr.pwn(2192) : error 021: symbol already defined: "Streamer_OnPlayerConnect"
C:\Users\Bill Gates\Desktop\ante desktop\New Folder (2)\CroMafia\gamemodes\cmr.pwn(2802) : error 017: undefined symbol "dini_IntSet"
C:\Users\Bill Gates\Desktop\ante desktop\New Folder (2)\CroMafia\gamemodes\cmr.pwn(2806) : error 021: symbol already defined: "Streamer_OnPlayerDisconnect"
C:\Users\Bill Gates\Desktop\ante desktop\New Folder (2)\CroMafia\gamemodes\cmr.pwn(11558) : error 029: invalid expression, assumed zero
C:\Users\Bill Gates\Desktop\ante desktop\New Folder (2)\CroMafia\gamemodes\cmr.pwn(11558) : error 029: invalid expression, assumed zero
C:\Users\Bill Gates\Desktop\ante desktop\New Folder (2)\CroMafia\gamemodes\cmr.pwn(11560) : warning 219: local variable "cmd" shadows a variable at a preceding level
C:\Users\Bill Gates\Desktop\ante desktop\New Folder (2)\CroMafia\gamemodes\cmr.pwn(11560) : warning 219: local variable "idx" shadows a variable at a preceding level
C:\Users\Bill Gates\Desktop\ante desktop\New Folder (2)\CroMafia\gamemodes\cmr.pwn(11571) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Users\Bill Gates\Desktop\ante desktop\New Folder (2)\CroMafia\gamemodes\cmr.pwn(11596) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Users\Bill Gates\Desktop\ante desktop\New Folder (2)\CroMafia\gamemodes\cmr.pwn(11631) : warning 225: unreachable code
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase


7 Errors.







evo link di je sve zapisano zauzima 5kb,http://www.2shared.com/uploadComplete.jsp?sId=R37FurIOF5tdR51Y
Poslednja Izmena: Avgust 07, 2010, 14:40:26 POSLE PODNE od Ante_Dracar aka Lopa

Na vrh dodaj include <dini> i dodaj dini include u include folder.

sta je ovo skoro svaki samper na balkanu koristi brunin mod XD
Little Devil will burn you

evo sad ovo



C:\Users\Bill Gates\Desktop\ante desktop\New Folder (2)\CroMafia\gamemodes\cmr.pwn(2175) : error 017: undefined symbol "udb_encode"
C:\Users\Bill Gates\Desktop\ante desktop\New Folder (2)\CroMafia\gamemodes\cmr.pwn(2177) : error 017: undefined symbol "udb_encode"
C:\Users\Bill Gates\Desktop\ante desktop\New Folder (2)\CroMafia\gamemodes\cmr.pwn(2193) : error 021: symbol already defined: "Streamer_OnPlayerConnect"
C:\Users\Bill Gates\Desktop\ante desktop\New Folder (2)\CroMafia\gamemodes\cmr.pwn(2803) : error 017: undefined symbol "udb_encode"
C:\Users\Bill Gates\Desktop\ante desktop\New Folder (2)\CroMafia\gamemodes\cmr.pwn(2807) : error 021: symbol already defined: "Streamer_OnPlayerDisconnect"
C:\Users\Bill Gates\Desktop\ante desktop\New Folder (2)\CroMafia\gamemodes\cmr.pwn(11559) : error 029: invalid expression, assumed zero
C:\Users\Bill Gates\Desktop\ante desktop\New Folder (2)\CroMafia\gamemodes\cmr.pwn(11559) : error 029: invalid expression, assumed zero
C:\Users\Bill Gates\Desktop\ante desktop\New Folder (2)\CroMafia\gamemodes\cmr.pwn(11561) : warning 219: local variable "cmd" shadows a variable at a preceding level
C:\Users\Bill Gates\Desktop\ante desktop\New Folder (2)\CroMafia\gamemodes\cmr.pwn(11561) : warning 219: local variable "idx" shadows a variable at a preceding level
C:\Users\Bill Gates\Desktop\ante desktop\New Folder (2)\CroMafia\gamemodes\cmr.pwn(11572) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Users\Bill Gates\Desktop\ante desktop\New Folder (2)\CroMafia\gamemodes\cmr.pwn(11597) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Users\Bill Gates\Desktop\ante desktop\New Folder (2)\CroMafia\gamemodes\cmr.pwn(11632) : warning 225: unreachable code
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase


7 Errors.