Jump to content
  • 0

Help


deso

Question


  • Group:  Members
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  80
  • Reputation:   0
  • Joined:  04/22/12
  • Last Seen:  

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.

post-4101-0-90011000-1371023678_thumb.png

try.txttry1.txttry2.txt

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  181
  • Reputation:   53
  • Joined:  04/07/13
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  80
  • Reputation:   0
  • Joined:  04/22/12
  • Last Seen:  

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 + "" ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  181
  • Reputation:   53
  • Joined:  04/07/13
  • Last Seen:  

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");


Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  80
  • Reputation:   0
  • Joined:  04/22/12
  • Last Seen:  

So I need to put "1","Zeny" or just "","Zeny" ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...