killerminx Posted March 17, 2009 Author Share Posted March 17, 2009 My server won't read the code putvar when i post this```npcnum=GetMapNPCnumber(GetPlayerMap(index),2) start_msg=getvar("scripts\mapextras\" & npcnum & ".ini", "QUEST", "Start_Msg") Call playermsg(index, name & " : " & start_msg, 15) Call putvar("scripts\charextras\" & GetPlayerName(index) & ".ini", "QUEST", npcnum, 1 )```its been working but the put var won't work i don't know wat to do. Link to comment Share on other sites More sharing options...
Hippoman789 Posted March 17, 2009 Share Posted March 17, 2009 ".ini",im no scripter but isnt there supposed to be a name there?likeQuests.ini Link to comment Share on other sites More sharing options...
AdrianC Posted March 17, 2009 Share Posted March 17, 2009 I'm assuming you've already declared some of those variables beforehand.First start_msg=getvar("scripts\mapextras\" & npcnum & ".ini", "QUEST", "Start_Msg")Make sure that the .ini file exists.SecondTry: Call putvar("scripts\charextras\" & GetPlayerName(index) & ".ini", "QUEST", int(npcnum), 1 ) Link to comment Share on other sites More sharing options...
Arcterious Posted March 17, 2009 Share Posted March 17, 2009 > npcnum=GetMapNPCnumber(GetPlayerMap(index),2)> start_msg=getvar("scripts\mapextras\" & npcnum & ".ini", "QUEST", "Start_Msg")> Call playermsg(index, name & " : " & start_msg, 15)> Call putvar("scripts\charextras\" & GetPlayerName(index) & ".ini", "QUEST", npcnum, 1 )The first thing I notice on almost every question, not entirely positive if it actually matters but it will sure make things look more clean, nobody puts spaces between their definitions and math equations. Like, start_msg=getvar. If it were,start_msg = GetVarlike I said, not positive if it helps, but it will work this way.Why are you making a separate ini folder for each monster and person? That is pointless and takes up a ton of space.> If GetVar("scripts\charextras\Players.ini", GetPlayerName(Index), "Quest") = "" Then> Call PutVar("scripts\charextras\Players.ini", GetPlayerName(Index), "Quest", "0")> End IfI haven't tested this, but I believe that would actually work. Also, this is assuming you want to start your definition of whatever it is. Also, what this does is, it will make a list under that persons name and puts Quest=0 under their name. I really don't understand what you are getting at, but I will see how I can help you.. If you want to put something in the "Quest" section, just do this.> If Blah Blah Blah Then> Call PutVar("Players.ini", GetPlayerName(Index), "Quest", ConvertToString(NpcNum))This will put the Npc's number in the Quest=0\. The 0 will change to whatever the Npc's number is. Link to comment Share on other sites More sharing options...
killerminx Posted March 23, 2009 Author Share Posted March 23, 2009 Well the putvar still aint working so i grabbed me a new a server.The reason i am making a ini file for each npc is that i can now script more than one quest per map and also have them in more than one quest Link to comment Share on other sites More sharing options...
Arcterious Posted March 25, 2009 Share Posted March 25, 2009 @killerminx:> Well the putvar still aint working so i grabbed me a new a server.> > The reason i am making a ini file for each npc is that i can now script more than one quest per map and also have them in more than one questJust grab their name and label the quests.. No reason to more than 1 file. 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