damian666 Posted May 4, 2009 Author Share Posted May 4, 2009 OK, back with another puzzling script O.o```Sub Set_Stats(Index, Inifile) 'Set variables Pokemon = GetVar(Inifile & "", "Data", "Name") 'Calculate HP IV = GetVar(Inifile & "", "IV", "HpIv") EV = GetVar(Inifile & "", "EV", "HpEv") Level = GetVar(Inifile & "", "Data", "Level") Base = GetVar("PokeSystem\Pokemon\" & Pokemon & ".ini", "Base", "HP") HP = int((2 * Base + IV + EV) * Level / 100 + Level + 10) Call PutVar(Inifile & "", "Stats", "HP", HP) Call PlayerMsg(Index, Pokemon & " has " & HP & " in HP stats.", YELLOW) Call PlayerMsg(Index, "Values " & IV & " " & EV & " " & Base & " " & Level & ".", YELLOW)End Sub```whenever i execute this sub, it runs until the putvar, after that… nothing XDwhen i comment it out, all works.also please note, the variable Inifile is a path to a inifile, like c:\test.iniso, anybody has any ideas?thanks in advance guys.Damian666 Link to comment Share on other sites More sharing options...
cheatking Posted May 4, 2009 Share Posted May 4, 2009 You have an un needed ) in your putvar.Call PutVar(Inifile & ""), "Stats", "HP", HP)Call PutVar(Inifile & "", "Stats", "HP", HP) Link to comment Share on other sites More sharing options...
damian666 Posted May 4, 2009 Author Share Posted May 4, 2009 O.o… damn itthats what ya get for looking at scripts for 5 hours ^^ill try and report backDamian666damn, no man, although it was a mistake, it still doesnt work, it should display the last messages, as debug sort of speak, but nothing :/any other ideas?Damian666 Link to comment Share on other sites More sharing options...
Bobosk Posted May 4, 2009 Share Posted May 4, 2009 you're not diming your variables Link to comment Share on other sites More sharing options...
damian666 Posted May 4, 2009 Author Share Posted May 4, 2009 aaah, that could be it ^^ill try, thanx guys, ill be back if it doesnt work XDDamian666 Link to comment Share on other sites More sharing options...
damian666 Posted May 4, 2009 Author Share Posted May 4, 2009 ```'Stat CalculationsSub Set_Stats(Index, Inifile) 'Declare variables Dim Pokemon Dim IV Dim EV Dim Level Dim Base Dim HP 'Set Variables Pokemon = GetVar(Inifile & "", "Data", "Name") IV = GetVar(Inifile & "", "IV", "HpIv") EV = GetVar(Inifile & "", "EV", "HpEv") Level = GetVar(Inifile & "", "Data", "Level") Base = GetVar("PokeSystem\Pokemon\" & Pokemon & ".ini", "Base", "HP") 'Calculate HP HP = int((2 * Base + IV + EV) * Level / 100 + Level + 10) Call PutVar(Inifile & "", "Stats", "HP", HP) Call PlayerMsg(Index, Pokemon & " has " & HP & " in HP stats.", YELLOW) Call PlayerMsg(Index, "Values " & IV & " " & EV & " " & Base & " " & Level & ".", YELLOW)End Sub```now i have this, still nothing :/any other suggestions?Damian666 Link to comment Share on other sites More sharing options...
Bobosk Posted May 4, 2009 Share Posted May 4, 2009 try replacing Base with something else, cause when i stick it in a VBscript editor, it shows up blue.. Link to comment Share on other sites More sharing options...
damian666 Posted May 4, 2009 Author Share Posted May 4, 2009 nope… goddamn XDstill the same, whenever i comment out the putvar, it works, i un-comment it, bam, its broken...what the hell is this for joke? I'm getting frustrated ^^thanks for helping mate :)Damian666 Link to comment Share on other sites More sharing options...
Bobosk Posted May 4, 2009 Share Posted May 4, 2009 Bleh, i didn't even notice the putvar, you're trying to use a variable "Path" that's not defined, anywhere… in the sub Link to comment Share on other sites More sharing options...
damian666 Posted May 5, 2009 Author Share Posted May 5, 2009 ok, still stuck.so i decided to make it somewhat easyer, just to see if t worked.```'Set VariablesPlayer = GetPlayerLogin(Index)Pokemon = GetVar("Accounts\" & Player & "\Battle\Wild.ini", "Data", "Name")IV = GetVar("Accounts\" & Player & "\Battle\Wild.ini", "IV", "HpIv")EV = GetVar("Accounts\" & Player & "\Battle\Wild.ini", "EV", "HpEv")Level = GetVar("Accounts\" & Player & "\Battle\Wild.ini", "Data", "Level")BaseStats = GetVar("PokeSystem\Pokemon\" & Pokemon & ".ini", "Base", "HP")'Calculate HP HP = int((2 * BaseStats + IV + EV) * Level / 100 + Level + 10)Call PutVar("Accounts\" & Player & "\Battle\Wild.ini", "Stats", "HP", HP)Call PlayerMsg(Index, Pokemon & " has " & HP & " in HP stats.", YELLOW)Call PlayerMsg(Index, "Values " & IV & " " & EV & " " & BaseStats & " " & Level & ".", YELLOW)```and guess what… still nothing :/still stops working if i use PutVar O.oanybody?Damian666 Link to comment Share on other sites More sharing options...
Akselj Posted May 5, 2009 Share Posted May 5, 2009 You need a \ before battle, else you will have to make one folder for each account. Link to comment Share on other sites More sharing options...
damian666 Posted May 5, 2009 Author Share Posted May 5, 2009 ah no, thats a typo, it actually points to a made folder,thats not it, not to mention it all works if i comment out the putvar line O.oso, i guess the problem lies there, but i cant see anything wrong thereDamian666 Link to comment Share on other sites More sharing options...
Akselj Posted May 5, 2009 Share Posted May 5, 2009 But you can't have typos in your scripts… Link to comment Share on other sites More sharing options...
damian666 Posted May 5, 2009 Author Share Posted May 5, 2009 nono, i mean its a typo in the forum ^^in the posted code, not in my script :)but keen eyes mate xDdamian666 Link to comment Share on other sites More sharing options...
Akselj Posted May 5, 2009 Share Posted May 5, 2009 @damian666:> but keen eyes mate xDThanks :DI can't see anything wrong in that PutVar except for that… Link to comment Share on other sites More sharing options...
damian666 Posted May 5, 2009 Author Share Posted May 5, 2009 yeah, thast what i thought O.oso weird, i test the first IF, so i call it with wild being 0and it all runs, except the putvar, after that, teh messages should show, but they dont …so, that means it stops at putvar xDdamian666 Link to comment Share on other sites More sharing options...
Bobosk Posted May 5, 2009 Share Posted May 5, 2009 Call PutVar("Accounts\" & Player & "\Battle\Wild.ini", "Stats", "HP", HP & "")try that, just for funsies.. Link to comment Share on other sites More sharing options...
damian666 Posted May 5, 2009 Author Share Posted May 5, 2009 WTF xDlol, that seemed to work man ^^the messages after the PutVar are now displayed, i cant check if the variable is really written, because server is not where i am, but tomorrow i can check that too.but, it seems to work man ^^all who have helped me, thanks a bunch, i was stuck with my battle system, and now i can finally continue :)thank you eclipse ^^Damian666 Link to comment Share on other sites More sharing options...
damian666 Posted May 6, 2009 Author Share Posted May 6, 2009 just a update, i checked teh server for teh variable, and it wrote it ^^so, this is solved :)Damian666 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now