Jump to content
  • 0

(NPC): (invisible/not on a map)


kiros

Question


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  60
  • Reputation:   9
  • Joined:  04/16/12
  • Last Seen:  

Currently using SVN: 17430,  Any one kindly mind to help me fixing this?

 

i was testing the "LevelUpBox" script by WhiteEagle all goes fine the script works but every time a user do a level up

and the effect is triggered this error happens. .. 

 

[Warning]: Unexpected type for argument 1. Expected number.
[Debug]: Data: variable name='.@effect$' index=0
[Debug]: Function: specialeffect2
[Debug]: Source (NPC): Levelupbox (invisible/not on a map)
[Warning]: Unexpected type for argument 1. Expected number.
[Debug]: Data: variable name='.@effect2$' index=0
[Debug]: Function: specialeffect2
[Debug]: Source (NPC): Levelupbox (invisible/not on a map)

 

this is a small example of that script

 

 

// ============== Credit =====================
// Scripted by WhiteEagle
// =============== For =======================
// Delphin Project
// ===========================================

-	script	Levelupbox	-1,{

OnPCBaseLvUpEvent:
set .@item$,501;	// Level 1 with Item "Red Potion";
set .@effect$,71;	// Specialeffect Spiral White balls
set .@effect2$,72;	// Specialeffect Bigger Spiral White balls
set .@effect3$,73;	// Specialeffect Blue/White Small Aura

if(BaseLevel == 10) {
specialeffect2 .@effect$;
specialeffect2 .@effect2$;
specialeffect2 .@effect3;
getitem .@item$,1;
dispbottom "Congratulation "+strcharinfo(0)+" to level 10!";
end;
}
}

 

 

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  254
  • Reputation:   72
  • Joined:  07/10/13
  • Last Seen:  

The warnings are displayed, because integer values are put into string variables and the commands used in this script require integer values.

Delete all the dollar symbols behind the variable names.

For example, change

set .@item$,501;
to
set .@item,501;
Edited by Xynvaroth
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  60
  • Reputation:   9
  • Joined:  04/16/12
  • Last Seen:  

Thank you, now is working fine /thx

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...