NostalgiaX Posted March 8, 2009 Author Share Posted March 8, 2009 I added Polkm's Good and Evil System to my Main.txt, but it's not working properly.I think I've narrowed the problem down a bit to these lines.```'Good Bad npcDim NPCSIDEDim GoodPointsDim BadPointsNPCSIDE=GetVar("NPCData.ini",GetNpcName(NPC_Num),"G\B")GoodPoints=GetVar("accounts\"&GetPlayerLogin(index)&"\"&GetPlayerName(index)&".ini","Good/Bad","GoodPoints")BadPoints=GetVar("accounts\"&GetPlayerLogin(index)&"\"&GetPlayerName(index)&".ini","Good/Bad","BadPoints")If NPCSIDE = G Then Call PutVar("accounts\"&GetPlayerLogin(index)&"\"&GetPlayerName(index)&".ini","Good/Bad","GoodPoints",""&GoodPoints - 1) 'Call PutVar("accounts\"&GetPlayerLogin(index)&"\"&GetPlayerName(index)&".ini","Good/Bad","BadPoints",""&BadPoints + 1)End IfIf NPCSIDE = B Then Call PutVar("accounts\"&GetPlayerLogin(index)&"\"&GetPlayerName(index)&".ini","Good/Bad","GoodPoints",""&GoodPoints + 1) 'Call PutVar("accounts\"&GetPlayerLogin(index)&"\"&GetPlayerName(index)&".ini","Good/Bad","BadPoints",""&BadPoints - 1) End If```I edited the code a bit.Here's what the NPCData.ini looks like.```[Koopa]G\B=B[Goomba]G\B=B[Toad]G\B=G[Bob-Omb]G\B=B```Whenever you kill ANY enemy (even if the enemy isn't on the NPCData.ini list), you gain a GoodPoint. How can I fix this?I am using EE2.7 Link to comment Share on other sites More sharing options...
xstaticdelta Posted March 8, 2009 Share Posted March 8, 2009 should this be on the npc death sub Link to comment Share on other sites More sharing options...
NostalgiaX Posted March 8, 2009 Author Share Posted March 8, 2009 Yeah, it's a part of the OnNPCDeath Sub. Sorry. Forgot to mention that. 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