ThePrax Posted August 16, 2008 Author Share Posted August 16, 2008 Hi,at first, im german, so my english is maybe not the best.My problem is, i just try to check for greater than with following values :if GetPlayerLevel(index) >= getvar("Skills\" & Skillname & ".ini", "Skill","reqlevel") then …i use the server debugging tool, you can turn on in the data.ini.i get every time the same error : type mismtch, but nothing works,i tryed every convertion, such as CInt(),CStr(),CDbl(),CLng(),...if i print out the values, i get playerlevel = 33 and reqlevel=5 but it does not work, if i try to convert, i get an error "mismatch", and if i do nothing, i get 33 is smaler than 5.Someone an idea?thanksThePrax Link to comment Share on other sites More sharing options...
dg1423 Posted August 16, 2008 Share Posted August 16, 2008 use Int() or Val() and make sure the ini exists and has a value in that variable should be like[SKILL]reqlevel=33 Link to comment Share on other sites More sharing options...
balliztik1 Posted August 17, 2008 Share Posted August 17, 2008 @ThePrax:> Hi,> at first, im german, so my english is maybe not the best.> > My problem is, i just try to check for greater than with following values :> > if GetPlayerLevel(index) >= getvar("Skills\" & Skillname & ".ini", "Skill","reqlevel") then …> > i use the server debugging tool, you can turn on in the data.ini.> > i get every time the same error : type mismtch, but nothing works,> i tryed every convertion, such as CInt(),CStr(),CDbl(),CLng(),...> > if i print out the values, i get playerlevel = 33 and reqlevel=5 but it does not work, if i try to convert, i get an error "mismatch", and if i do nothing, i get 33 is smaler than 5.> > Someone an idea?> > thanks> > ThePraxIt sounds like you know what you are doing, and it looks like you've got things set up right, so I'm not seeing a problem. This is odd.Adding this into my own main.txt works, so I have no idea what's up. What version are you using? I don't know if that will have anything to do with it, but it's good to know, just in case. Link to comment Share on other sites More sharing options...
ThePrax Posted August 18, 2008 Author Share Posted August 18, 2008 Hi, i got it, everytime i used the getVar() command inner if-then architecture it doesnt work, also i used an variable in the Filename like :getvar("Scripts\Charextras\" & Playername & "_Skills.ini", CStr(trim(Skillname)), "kann")it must begetvar("Scripts\Charextras\" & CStr(trim(Playername)) & "_Skills.ini", CStr(trim(Skillname)), "kann")at least.man, so many hours for searching the bug,…now it works, and i have hardcoded my own skillsystem in EE2.7its harder than my minimap-system, or my questsystem, but now i can make as many skills as i want.thanks allot for your help!greetz ThePrax 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