06.12.2008, 23:51
The error is not on your script! It's on the include
Check the line 231 of the file 'pBank.inc'
Quote:
include\pBank.inc(231) |
include\pBank.inc(231) |
Originally Posted by YeahYeahYeahs
The error is not on your script! It's on the include
Quote:
|
|
if(strcmp(cmd,"/bankregister",true)==0) { new tmp[256]; new playername[256]; new string[256]; tmp=strtok(cmdtext,idx); if(!strlen(tmp)) { SendClientMessage(playerid,DarkGreen,"USAGE : /bankregister [password]"); return 1; } if(!PlayerToPoint(3.0,playerid,2316.6160,-7.5284,26.7422)) return SendClientMessage(playerid,AdminRed,"Must be near the bank counter!"); if(PlayerStats[playerid][BankLogged]==1) return SendClientMessage(playerid,AdminRed,"You're already logged in!"); GetPlayerName(playerid,playername,sizeof(playername)); new fstring[50]; format(fstring,50,"%s.xcu",udb_encode(playername)); new create=pBank_CreateBankAccount(fstring,-100,tmp); if(create == -1) { SendClientMessage(playerid,DarkGreen,"You have already registered a bank account under this name!"); SendClientMessage(playerid,DarkGreen,"Use /banklogin [password] to login into your bank account!"); return 1; } format(string,sizeof(string),"You are now bankregistered under playername %s and password %s!",playername,tmp); SendClientMessage(playerid,DarkGreen,string); printf("%s registered a bank account with password %s",playername,tmp); return 1; } if(strcmp(cmd,"/banklogin",true)==0) { new tmp[256]; new playername[256]; tmp=strtok(cmdtext,idx); if(!strlen(tmp)) { SendClientMessage(playerid,DarkGreen,"USAGE : /banklogin [password]"); return 1; } if(!PlayerToPoint(3.0,playerid,2316.6160,-7.5284,26.7422)) return SendClientMessage(playerid,AdminRed,"Must be near the bank counter!"); if(PlayerStats[playerid][BankLogged]==1) return SendClientMessage(playerid,AdminRed,"You're already logged in!"); GetPlayerName(playerid,playername,sizeof(playername)); new fstring[50]; format(fstring,50,"%s.xcu",udb_encode(playername)); new login=pBank_LoginPlayerToBank(fstring,tmp); if(login==-1) { SendClientMessage(playerid,DarkGreen,"Invalid Password!"); return 1; } if(login==0) { SendClientMessage(playerid,DarkGreen,"You have not registered a bank account yet under this name!"); SendClientMessage(playerid,DarkGreen,"Use /bankregister [password] to create a bank account!"); return 1; } PlayerStats[playerid][BankLogged]=1; SendClientMessage(playerid,DarkGreen,"You have successfully logged in into your bank account!"); return 1; }
dini_IntSet(tmp,"AccountBalance",total);
public OnPlayerDisconnect(playerid, reason)
{
pBank_PlayerDisconnect("Pixels");
//if your name isn't Pixels, too bad :D
return 1;
}
The error is not on your script! It's on the include
Check the line 231 of the file 'pBank.inc' |