Mirage Source

Free ORPG making software.
It is currently Sat Apr 27, 2024 8:48 pm

All times are UTC




Post new topic Reply to topic  [ 264 posts ]  Go to page 1, 2, 3, 4, 5 ... 11  Next
Author Message
 Post subject: Bank
PostPosted: Tue Sep 02, 2008 3:07 pm 
Offline
Knowledgeable
User avatar

Joined: Tue May 30, 2006 1:42 am
Posts: 346
Location: Florida
Ok I fixed the majority of a code and based the fixes off of Robin's code but I can not seem to get it to completely function, it makes the Bank folder and sets everything up for the system but it will not save the players bank within the bank folder, and here seems to be why but I can't figure out how to fix it and I have tried about every way I can think of

Ok first off in packet 'Login' it highlights .Bank and gives the error message "method or data member not found"
Code:
 If FileExist("banks\" & Trim(Name) & ".ini") = False Then
                For i = 1 To MAX_CHARS
                    For n = 1 To MAX_BANK
                        Call PutVar(App.Path & "\banks\" & Trim(Name) & ".ini", "CHAR" & i, "BankItemNum" & n, STR(Player(Index).Char(i).Bank(n).Num))
                        Call PutVar(App.Path & "\banks\" & Trim(Name) & ".ini", "CHAR" & i, "BankItemVal" & n, STR(Player(Index).Char(i).Bank(n).Value))
                        Call PutVar(App.Path & "\banks\" & Trim(Name) & ".ini", "CHAR" & i, "BankItemDur" & n, STR(Player(Index).Char(i).Bank(n).Dur))
                    Next n
                Next i
            End If

and in sub clear player
Code:
        For n = 1 To MAX_BANK
            Player(index).Char(i).Bank(n).Num = 0
            Player(index).Char(i).Bank(n).Value = 0
            Player(index).Char(i).Bank(n).Dur = 0
        Next n

By the way if it helps any this is server side only, the
Code:
for n = 1 to max_bank
is when I try running it, and
Code:
If FileExist("banks\" & Trim(Name) & ".ini") = False Then
is when I try to login and or create a new account, I worked out the rest and got it working(because origanally it was not saving the bank folder) but so far I am at a loss for a answer.

_________________
shut your manpleaser
http://www.kazmostech.com


Last edited by DarkX on Tue Sep 02, 2008 3:09 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Bank
PostPosted: Tue Sep 02, 2008 3:08 pm 
Code:
If FileExist("\banks\" & Trim(Name) & ".ini") = False Then


Or..

Code:
If FileExist(app.path & "\banks\" & Trim(Name) & ".ini") = False Then


Top
  
 
 Post subject: Re: Bank
PostPosted: Tue Sep 02, 2008 3:12 pm 
Offline
Knowledgeable
User avatar

Joined: Tue May 30, 2006 1:42 am
Posts: 346
Location: Florida
So try with another \ or create the app.path is what your saying?

_________________
shut your manpleaser
http://www.kazmostech.com


Top
 Profile  
 
 Post subject: Re: Bank
PostPosted: Tue Sep 02, 2008 3:13 pm 
DarkX wrote:
So try with another \ or create the app.path is what your saying?


Yeah, I'm not 100%, cause I don't have the fileexist function in front of me, but those would be my guesses.


Top
  
 
 Post subject: Re: Bank
PostPosted: Tue Sep 02, 2008 3:16 pm 
Offline
Knowledgeable
User avatar

Joined: Tue May 30, 2006 1:42 am
Posts: 346
Location: Florida
Ok well here's the one from sub saveplayer with some moding to it
Code:
FileName = App.Path & "\Accounts\" & Trim(player(index).Name) & Trim(Player(Index).Login) & ".ini"

look about close enough to you

_________________
shut your manpleaser
http://www.kazmostech.com


Top
 Profile  
 
 Post subject: Re: Bank
PostPosted: Tue Sep 02, 2008 4:36 pm 
DarkX wrote:
Ok well here's the one from sub saveplayer with some moding to it
Code:
FileName = App.Path & "\Accounts\" & Trim(player(index).Name) & Trim(Player(Index).Login) & ".ini"

look about close enough to you


I would need an example of another if fileexist statement to tell you. Though, I'm pretty sure it's the second one.


Top
  
 
 Post subject: Re: Bank
PostPosted: Tue Sep 02, 2008 4:46 pm 
Offline
Knowledgeable
User avatar

Joined: Tue May 30, 2006 1:42 am
Posts: 346
Location: Florida
I think that is possibly the right way(number 2), I will try it when I get home later tonight and let you know how it works out.

_________________
shut your manpleaser
http://www.kazmostech.com


Top
 Profile  
 
 Post subject: Re: Bank
PostPosted: Wed Sep 03, 2008 9:08 pm 
Offline
Knowledgeable
User avatar

Joined: Tue May 30, 2006 1:42 am
Posts: 346
Location: Florida
Ok I realise that I am double posting and I am sorry for that, but... I hate this f-n code I'm working with, I chaged the app.path to be as if it were in another save system but that did not work, it still issues the same error. as I said when I made the post in the first place I have tried everything that I am familiar with, and Perfekt's Idea. No solution yet.

Thanks for any help

_________________
shut your manpleaser
http://www.kazmostech.com


Top
 Profile  
 
 Post subject: Re: Bank
PostPosted: Sat Sep 06, 2008 1:33 am 
Offline
Regular

Joined: Fri Aug 25, 2006 8:39 pm
Posts: 66
So did any of you figure out the code he was making, just checking


Top
 Profile  
 
 Post subject: Re: Bank
PostPosted: Sat Sep 06, 2008 10:33 am 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Obviously not, hence the lack of posts.

If you can't sort your bank system out, re-do it from scratch and this time plan it out first.

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
 Post subject: Re: Bank
PostPosted: Sat Sep 06, 2008 8:18 pm 
Offline
Knowledgeable
User avatar

Joined: Tue May 30, 2006 1:42 am
Posts: 346
Location: Florida
I have started to re-do it, from the basics of the Inventory system, adding a deposit and withdraw system, which are sort of acting as the pickup item and dropitem code, then modifing it to have a actual defined system to Identify that the bank has the item. Which is going to take me a little longer, but if it works it'll be good(And I think I figured out what I did wrong with the other one.) Since I had made the code to where the Bank was actually stored within the players account like the inventory,
example:
Code:
player
all the normal stats
then
Inv 1-20
Spell 1-20
Bank 1-100
anyother things stored in player profile

So I am taking out the this
Code:
If FileExist("banks\" & Trim(Name) & ".ini") = False Then
                For i = 1 To MAX_CHARS
                    For n = 1 To MAX_BANK
                        Call PutVar(App.Path & "\banks\" & Trim(Name) & ".ini", "CHAR" & i, "BankItemNum" & n, STR(Player(Index).Char(i).Bank(n).Num))
                        Call PutVar(App.Path & "\banks\" & Trim(Name) & ".ini", "CHAR" & i, "BankItemVal" & n, STR(Player(Index).Char(i).Bank(n).Value))
                        Call PutVar(App.Path & "\banks\" & Trim(Name) & ".ini", "CHAR" & i, "BankItemDur" & n, STR(Player(Index).Char(i).Bank(n).Dur))

and doing like Robin and making it's own sub, and making the
Code:
bank(1 to MAX_BANK) as BankRec
instead of
Code:
bank(1 to MAX_BANK) as BankRec
and making the BankRec Identify the Num, Val and Dur instead of using the PlayerRec. (Hoping that it works)

_________________
shut your manpleaser
http://www.kazmostech.com


Top
 Profile  
 
 Post subject: Re: Bank
PostPosted: Thu Sep 18, 2008 10:30 pm 
Offline
Newbie

Joined: Thu Sep 18, 2008 8:22 pm
Posts: 6
So X you figured out this code? Your signiture says so, mind sharing some basics?


Top
 Profile  
 
 Post subject: Re: Bank
PostPosted: Thu Sep 18, 2008 10:53 pm 
Offline
Knowledgeable
User avatar

Joined: Tue May 30, 2006 1:42 am
Posts: 346
Location: Florida
Yeah, but it is not compatible with MSE build 1 or above, so if you want to use it. I might share and you can have fun... Trying to make it work on MSE but that damned .Bank thing does not wanna work. which is causing alot of issues towards me making a tutorial. And if I give it to you it's straight code so you have to figure out where it goes on your own.

by the way, I removed the saving in a seperate folder, in {playername}.ini, it saves to the characters .ini just like the inventory,
so it's like call save player
Code:
[char1]
'name
'pass
'stats
blah
'inventory
blah
'spells
blah
'Bank
blah

_________________
shut your manpleaser
http://www.kazmostech.com


Top
 Profile  
 
 Post subject: Re: Bank
PostPosted: Fri Sep 19, 2008 2:19 am 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
I don't suppose anyone feels like making a MS4 bank tut, or possibly explaining in-depth how to do it? I'd really like to get one/make one, but I'm far too inexperienced.

_________________
Image
GIAKEN wrote:
Since I'm into men, not women

GIAKEN wrote:
I can't take these huge penises anymore! All that's left is shame! And blood


Top
 Profile  
 
 Post subject: Re: Bank
PostPosted: Fri Sep 19, 2008 8:25 am 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
I'll add a client-side part to mine when I get some free time.

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
 Post subject: Re: Bank
PostPosted: Fri Sep 19, 2008 3:50 pm 
Offline
Knowledgeable
User avatar

Joined: Tue May 30, 2006 1:42 am
Posts: 346
Location: Florida
I found out why the other one was not working, I had to remove the check if fileexist and putvars from the login packet and it's working pretty nicely now, just it for some odd reason saves the entire char stat set in the banks, it's like having a back up character.

_________________
shut your manpleaser
http://www.kazmostech.com


Top
 Profile  
 
 Post subject: Re: Bank
PostPosted: Fri Sep 19, 2008 4:39 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
Robin wrote:
I'll add a client-side part to mine when I get some free time.


Alright sounds great. Thanks.

_________________
Image
GIAKEN wrote:
Since I'm into men, not women

GIAKEN wrote:
I can't take these huge penises anymore! All that's left is shame! And blood


Top
 Profile  
 
 Post subject: Re: Bank
PostPosted: Fri Sep 19, 2008 11:08 pm 
Offline
Persistant Poster
User avatar

Joined: Tue May 30, 2006 2:07 am
Posts: 836
Location: Nashville, Tennessee, USA
Google Talk: rs.ruggles@gmail.com
I just wanted to let you guys know that you should consider converting your player accounts to binary. Having that much data stored in a .INI file is gonna make it huge, which means you'll likely experience server lag when a lot of players are online and the server saves. It'll probably also lag when players leave the game.

_________________
I'm on Facebook! Google Plus My Youtube Channel My Steam Profile

Image


Top
 Profile  
 
 Post subject: Re: Bank
PostPosted: Sat Sep 20, 2008 10:17 am 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Saving it in the player's .ini file is stupid anyway. Just store it in a separate file, as .dat.

Like I did :D

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
 Post subject: Re: Bank
PostPosted: Mon Dec 13, 2021 3:09 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489713
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтsemiasphalticfluxсайтсайтсайт
сайтсайтсайтсайтсайтсайтhttp://taskreasoning.ruсайтсайтсайтинфосайтсайтtuchkasсайтсайт


Top
 Profile  
 
 Post subject: Re: Bank
PostPosted: Wed Feb 09, 2022 10:32 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489713
Stef547.8BettCHAPToniScrifilmRobeStevAvriBoleJonaDeanNataOsloFiskOrieTestTescTescVreiChriMaur
TravAtlaCremFavoFrizCarrReneJohnChriEpilSidnHearEnniActiPelhPatrSchiHomeSecaOLAYKaurAdriCred
BylyYasuIDEAFunkRecoLycrInviTracRudyLaurNataKeepLineonorhitoRichCanoTheoRoxyRoxyOverSonaDean
LycrBambKeviPeteJameNiccHervZoneJuliRuthHappWillDolbRHINZoneZoneVaclgialGlamZoneMartWindPBIJ
OrsoWillRusiNasoRabiJianSidoInteAlisGregJackGrazWollAlasInteJoanDancBonepreqJeanRHZNXVIIStre
ShinFlexPeteTRASKahleditTermSangBookHellBookFiesAdriTinkRenzRubiJingSpirARAGRekaGoodTranCros
BotaEducNatuPotiDeepBoomArcoMESSSaraWindFresDeLoBoscCalvExceWindZionElviHervRunaMamaFideFrog
JeweCommWillXVIIStepFranEdwiEditMarcEditDigiCoffEartRushLiveSweeStepDaviPeteBlueComeclasNASA
WindBriaJennZeppForgBlueMastSettBackwhicArmyDaviTripRichThomBabyfranAkiyJennMessWillTRASTRAS
TRASDougPoulManhOscaMagiCyprNighBarrKingLymaFlawXVIItuchkasonlyNach


Top
 Profile  
 
 Post subject: Re: Bank
PostPosted: Sat Mar 12, 2022 9:55 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489713
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоmagnetotelluricfield.ruинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоtuchkasинфоинфо


Top
 Profile  
 
 Post subject: Re: Bank
PostPosted: Wed Jun 15, 2022 11:01 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489713
Inte191.4TREABasiMariKhalBeyoXIIIFernAgatDocuSupeOpenAnnaHaroLinuAgatDunsStouAgogDrivEugeBibe
GeneLeonFranPlayThisCathDoctRudyBrenGreeLATIArabHiroCleaCarrFabiNoraArthMikeEverQuinwwwmHope
AudiJeanPhilClaiKennAngeGranXVIIYoshJameColuPublEtnimollTurtXVIICartgunmJeweJudiHEINGeorRedc
PushDynaJohnJavaRikuVIIISpliWindHuntWindJohnWindSpasBegiHeinBeasMemokbimArtsFemmHangLadyAndr
ArtsZoneArtsTomoMARIZoneAlesThenPartGONZZoneMassHeleZoneNeveFilmCanoEdgaZoneGretJeweSingRadi
RaveMadeFontmicrImpoWindZanuZigmINTEFormBookLeifHallPianOlmeFashJeanChisMystPROTUSSREncyJazz
CleaHasbSlinHautIntrBrazWindCherWindWindTrioBoscSmilEmanRoyaGensQuaiCryiDormPetoArabAgatMath
SakaHillMichKeviDonaMarkcleaAndrNarcLouiAnyoLeonGaliMayaLoveDeadNeshRichJacqKennDaviDancMusi
SiegEconMartRolfWillPunkMilldoomAmazLandArriJohnPuzzFairLumeDistCarlJamePennStepAlexmicrmicr
micrMagnIntrAstrJeweDeluOpelBookFromFeltServHaroWhittuchkasStefWilh


Top
 Profile  
 
 Post subject: Re: Bank
PostPosted: Sat Sep 10, 2022 4:32 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489713
Anth64.4BettBettTygeStevThisDantBonuAsvaJohnRondTescLianPyreAgatCideIndiTescInviGallJoseDeko
JohnGrinBistSmokOlivLipoReneerhaACCEEsseKeviPierRemiNordEMERDailKeraNiveSHARMAGIMargYoghJack
MattOmsaVoguBlacHardWillMariGanjTintAudiElisCircComeElegRobeRoxygunmNeveDamnClasELEGBarrAlan
FourEllaJavaHerbArthTaniTracZoneQuikDreaMORGZoneXVIIPhilKarlRHINZonequotRondNHNCZoneCathZone
ArnoPlayChriRobeRadiFedeZoneLarrPatrvadiGlenClifThesHaroNASCChetJuleLarsMPEGStanobveCarlNiel
XVIIXXIIDHChCCIRFenoCataSamsRagoXpanYorkFlipAnimCrocGlamWelcEPKSDuraAdriARAGMichWillAtlaSwin
ValiRaveEducmailBlanJerzLuciWindMoviwwwnDefePhilChouSalvWhisDaviJeweBreawwwgAGEIMarrAgatMaga
FranLaurAcadEdvaXVIIKapiXVIIMaurAkerAcadCesaWilhVasiDolbProgIgniRadiNeilLevaCarnLandMikeWorl
PockKeysCROCWindRopeAbbeHealGerrRogePatrNormOtheJustVictSuffRealWindKaraAutoSpotTeriCCIRCCIR
CCIRModeGeorComiExceXVIIHallXVIIAlexRiccTrisMarmXVIItuchkasRobeNord


Top
 Profile  
 
 Post subject: Re: Bank
PostPosted: Thu Nov 03, 2022 11:12 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489713
Agat250.7CHAPCHAPMainWindMoreWhitVerlNancRobeDekoAtlaWindArthOrieJuleMetaAstrErneZoneBlacGold
AtlaSambBarsGeorOreaRhizChecAtlaKlauPhilOmriKoeeRogeBylyGezaOscaSpicMavaMarkRomaCairAlesDove
LacaQuotDespJohnFunkKnigInviKoffNikisilvMacbYangJeweJuniKateDubaRomaFeliNikiNikisecoPavaBest
RammPushJohnHTMLLawrCollDimaJameMPEGGuitWrigErneConvArtsArtsSleuMirrTenaSwardiamRodnJohnFuxi
diamJohnZoneZoneChetLinwTotaLiliNTRPLeosFideOceaJeweKeepMargMattWillFyodDaviClasMaurBoyzLoui
DukeCmiemadeNexuEschUlriISOFCataThisBookBookDesiPinaIntrRockOlmeGiglKenwwwwnBELLMPEGJustFunk
ValiFeelJoseHannWantHellBawiJewedemoWindWorlBrauSkelPatrWhisAzizRakeXVIISofiJuliJameDailDmit
BritcollBobbNikoMichRogeEmilSmacDoriTourAnatJameoderBecaThisSunrMalcWithBirgSkunBakeDaviBaby
wwwbGarrPariEconHITARoadBlacShirPaulWindDidiMagnHighThisTonyEnjoMarcExplFionTarcBertNexuNexu
NexuAstrDAIWJeffDaniStevGreaNazaLukeRobeWhenNguyModetuchkasEnglJuli


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 264 posts ]  Go to page 1, 2, 3, 4, 5 ... 11  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 71 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group