deso Posted June 12, 2013 Group: Members Topic Count: 36 Topics Per Day: 0.01 Content Count: 80 Reputation: 0 Joined: 04/22/12 Last Seen: August 21, 2013 Share Posted June 12, 2013 When I open the script this error come out and when I try copy the npc and make a new one the other npc won't work. try.txttry1.txttry2.txt Quote Link to comment Share on other sites More sharing options...
DeadlySilence Posted June 12, 2013 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 181 Reputation: 53 Joined: 04/07/13 Last Seen: August 23, 2014 Share Posted June 12, 2013 As the debug messages say: the compare function expects a string, but you gave it a number. To convert a number to string, just use this: .@yourNumberVar + "" By adding an empty string to it (""), it will be intrepreted as a string. Quote Link to comment Share on other sites More sharing options...
deso Posted June 12, 2013 Group: Members Topic Count: 36 Topics Per Day: 0.01 Content Count: 80 Reputation: 0 Joined: 04/22/12 Last Seen: August 21, 2013 Author Share Posted June 12, 2013 As the debug messages say: the compare function expects a string, but you gave it a number. To convert a number to string, just use this: .@yourNumberVar + "" By adding an empty string to it (""), it will be intrepreted as a string. Sry I'm noob could you tell me where will I put .@yourNumberVar + "" ? Quote Link to comment Share on other sites More sharing options...
DeadlySilence Posted June 12, 2013 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 181 Reputation: 53 Joined: 04/07/13 Last Seen: August 23, 2014 Share Posted June 12, 2013 You have to add it to every getarg in every compare. For example the lines 13 and 14: // line 13 for(set .e,0; !compare(getarg(.e+1),"Zeny"); set .e,.e+2) {} => for(set .e,0; !compare(getarg(.e+1) + "","Zeny"); set .e,.e+2) {} // line 14 npcshopadditem "EV_VSET",getarg(.e+2),getarg(.e)*compare(getarg(.e+1),"SZeny"); => npcshopadditem "EV_VSET",getarg(.e+2),getarg(.e)*compare(getarg(.e+1) + "","SZeny"); Quote Link to comment Share on other sites More sharing options...
deso Posted June 12, 2013 Group: Members Topic Count: 36 Topics Per Day: 0.01 Content Count: 80 Reputation: 0 Joined: 04/22/12 Last Seen: August 21, 2013 Author Share Posted June 12, 2013 So I need to put "1","Zeny" or just "","Zeny" ? Quote Link to comment Share on other sites More sharing options...
Question
deso
When I open the script this error come out and when I try copy the npc and make a new one the other npc won't work.
try.txttry1.txttry2.txt
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.