Help with this error -
djcabo - 28.07.2012
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!
Re: Help with this error -
ToiletDuck - 28.07.2012
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;
}
Re: Help with this error -
djcabo - 28.07.2012
in what lines?
Re: Help with this error -
djcabo - 29.07.2012
thank you it worksss!! and Its FIxeddddd
Код:
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Re: Help with this error -
ToiletDuck - 29.07.2012
No Problem
Re: Help with this error -
Revo - 29.07.2012
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.
Re: Help with this error -
Private200 - 29.07.2012
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