kiros Posted July 28, 2013 Share Posted July 28, 2013 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='[email protected]$' 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='[email protected]$' 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 [email protected]$,501; // Level 1 with Item "Red Potion"; set [email protected]$,71; // Specialeffect Spiral White balls set [email protected]$,72; // Specialeffect Bigger Spiral White balls set [email protected]$,73; // Specialeffect Blue/White Small Aura if(BaseLevel == 10) { specialeffect2 [email protected]$; specialeffect2 [email protected]$; specialeffect2 [email protected]; getitem [email protected]$,1; dispbottom "Congratulation "+strcharinfo(0)+" to level 10!"; end; } } Quote Link to comment Share on other sites More sharing options...
Xynvaroth Posted July 28, 2013 Share Posted July 28, 2013 (edited) 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 [email protected]$,501;toset [email protected],501; Edited July 28, 2013 by Xynvaroth Quote Link to comment Share on other sites More sharing options...
kiros Posted July 28, 2013 Author Share Posted July 28, 2013 Thank you, now is working fine Quote Link to comment Share on other sites More sharing options...
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. ..
this is a small example of that script
// ============== Credit ===================== // Scripted by WhiteEagle // =============== For ======================= // Delphin Project // =========================================== - script Levelupbox -1,{ OnPCBaseLvUpEvent: set [email protected]$,501; // Level 1 with Item "Red Potion"; set [email protected]$,71; // Specialeffect Spiral White balls set [email protected]$,72; // Specialeffect Bigger Spiral White balls set [email protected]$,73; // Specialeffect Blue/White Small Aura if(BaseLevel == 10) { specialeffect2 [email protected]$; specialeffect2 [email protected]$; specialeffect2 [email protected]; getitem [email protected]$,1; dispbottom "Congratulation "+strcharinfo(0)+" to level 10!"; end; } }Link to comment
Share on other sites