Help with this error
#1

i'm making my own simple bank system but when i compile this FS

http://pastebin.com/2bHhREzQ

and when i try to compile the error comes out!
Код:
C:\Users\ahmad hadi\Documents\Roleplay\Bank\DCbank.pwn(69) : error 017: undefined symbol "dcbank"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Please Help Me To Fix It!
Reply
#2

try
pawn Код:
public OnPlayerDisconnect(playerid,reason)
{
    new dcbank[128];
    pBankInfo[playerid][PLAYER_INBANK] = 0;
        new Name[24]; GetPlayerName(playerid,Name,24);
        new file[100]; format(file,100,dcbank,Name);
        dini_IntSet(file,"Balance",pBankInfo[playerid][PLAYER_BALANCE]);
        dini_IntSet(file,"InBank",pBankInfo[playerid][PLAYER_INBANK]);
        return 1;
}
Reply
#3

in what lines?
Reply
#4

thank you it worksss!! and Its FIxeddddd

Код:
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Reply
#5

No Problem
Reply
#6

Quote:
Originally Posted by ToiletDuck
Посмотреть сообщение
try
pawn Код:
public OnPlayerDisconnect(playerid,reason)
{
    new dcbank[128];
    pBankInfo[playerid][PLAYER_INBANK] = 0;
        new Name[24]; GetPlayerName(playerid,Name,24);
        new file[100]; format(file,100,dcbank,Name);
        dini_IntSet(file,"Balance",pBankInfo[playerid][PLAYER_BALANCE]);
        dini_IntSet(file,"InBank",pBankInfo[playerid][PLAYER_INBANK]);
        return 1;
}
That didn't solve anything but supress the error.
DCbank holds an empty value and you're formatting your file to something empty.
I think you're better off using this:

pawn Код:
public OnPlayerDisconnect(playerid,reason)
{
        new Name[24]; GetPlayerName(playerid,Name,24);
        new file[100]; format(file,100,"%s",Name);
        dini_IntSet(file,"Balance",pBankInfo[playerid][PLAYER_BALANCE]);
        dini_IntSet(file,"InBank",pBankInfo[playerid][PLAYER_INBANK]);  
        pBankInfo[playerid][PLAYER_INBANK] = 0;
        pBankInfo[playerid][PLAYER_BALANCE] = 0;        
        return 1;
}
That is, if you don't want broken code.
If you're not going to rename your file, you can remove the entire file array and just go with Name instead of the file.
Reply
#7

Dont the fuck help him , he is a idiot , steal others fs and post them as their's , stop trolling , we all know who you are
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)