Zananok Posted July 22, 2008 Author Share Posted July 22, 2008 i made a pet system that does it all.. lvl up get str and def.. atc other npcs and follows u.. etc..but i got a minor bug that its very wierd… what the heck? its a bug? ;)(2.7)```dim slot...slot = 1do while slot <= 25 if GetMapNPCnumber(getplayermap(index), slot) = 0 then ... Call putvar("pets\pet.ini", "PET", getplayermap(owner), slot)else... slot = slot + 1 end if loop ```the hole code works perfect… except this line... it blocks"Call putvar("pets\pet.ini", "PET", getplayermap(owner), slot)"(owner is alredy defined...)the code works if i put:"Call putvar("pets\pet.ini", "PET", getplayermap(owner), "")"its supposed to put the number of 'slot' from the 'do while' on the .ini..anyway, i apreciate some help on that...Thanks in advFrom: Zananok Link to comment Share on other sites More sharing options...
balliztik1 Posted July 23, 2008 Share Posted July 23, 2008 Try using Cstr(slot). PutVar is expecting a string value as the fourth parameter, and though you didn't specify slot as string, it is a numeric value, and it can't hurt to try. Link to comment Share on other sites More sharing options...
Zananok Posted July 23, 2008 Author Share Posted July 23, 2008 i didnt tryed your idea yet, but i found another way not long ago…"Call putvar("pets\pet.ini", "PET", getplayermap(owner), slot + 0)"or"Call putvar("pets\pet.ini", "PET", getplayermap(owner), slot & "")"but thanks anyway :cheesy: i really apreciateFrom: Zananok 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