Warden Posted July 7, 2011 Author Share Posted July 7, 2011 Hello,well i wanted to learn some scripting so umh i added the lines so if you get leveled up it will make a animation for sec so everybody could see,but when i compile it,it says Variable not defined,so how can i define?> …...........> > If level_count > 0 Then> If level_count = 1 Then> 'singular> ERROR HERE x = GetPlayerX(index)> ERROR HERE y = GetPlayerY(index)> GlobalMsg GetPlayerName(index) & " has gained " & level_count & " level!", Brown> Call SendAnimation(GetPlayerMap(index), 62, x, y)> > Else> 'plural> GlobalMsg GetPlayerName(index) & " has gained " & level_count & " levels!", Brown> Call SendAnimation(GetPlayerMap(index), 62, x, y)> End If> SendEXP index> SendPlayerData index> End If> End Sub Link to comment Share on other sites More sharing options...
GKO Posted July 7, 2011 Share Posted July 7, 2011 soo up at the top of the sub add thisGetPlayerX as stringGetPlayerY as stringOr it might be this not surePlayerX as stringPlayerY as string Link to comment Share on other sites More sharing options...
MrKris Posted July 7, 2011 Share Posted July 7, 2011 Its not scripting, its coding. Scripting is in a notepad :P Link to comment Share on other sites More sharing options...
Ruins of Hell Posted July 7, 2011 Share Posted July 7, 2011 @Smore:> Its not scripting, its coding. Scripting is in a notepad :P@GKO:> soo up at the top of the sub add this> > GetPlayerX as string> GetPlayerY as string> > Or it might be this not sure> > PlayerX as string> PlayerY as stringNo.```Sub foobar ()Dim x as IntegerDim y as Integer' code hereEnd Sub``` Link to comment Share on other sites More sharing options...
GKO Posted July 7, 2011 Share Posted July 7, 2011 yes thats it, i thought that looked funny. ive been working with php for the past couple weeks soo im getting a little mixed upEdit:and FYI you might wanna lock this topic or we might get some flaming on our hands. Link to comment Share on other sites More sharing options...
Warden Posted July 7, 2011 Author Share Posted July 7, 2011 i got the error off now thanks,but is the line :> Call SendAnimation(GetPlayerMap(index), 62, x, y)written right?it should do anim nr 62 if i get level Link to comment Share on other sites More sharing options...
Ruins of Hell Posted July 7, 2011 Share Posted July 7, 2011 Try:```Dim x As LongDim y As Long```Instead. Link to comment Share on other sites More sharing options...
Warden Posted July 7, 2011 Author Share Posted July 7, 2011 > If level_count > 0 Then> If level_count = 1 Then> 'singular> Dim x As Long> Dim y As Long> x = GetPlayerX(index)> y = GetPlayerY(index)> > GlobalMsg GetPlayerName(index) & " has gained " & level_count & " level!", Brown> Call SendAnimation(GetPlayerMap(index), 62, x, y)> > Else> 'plural> GlobalMsg GetPlayerName(index) & " has gained " & level_count & " levels!", Brown> Call SendAnimation(GetPlayerMap(index), 62, x, y)> End If> SendEXP index> SendPlayerData index> End If> End Sublike that?if thats right it aint working Link to comment Share on other sites More sharing options...
evilbunnie Posted July 7, 2011 Share Posted July 7, 2011 @Warden:> like that?if thats right it aint workingJesus, please be more informative.'It aint working' isn't going to tell us nothing. What is it doing? Is there an error?Also;```Dim x As LongDim y As Long ' Set the coordinates x = GetPlayerX(index) y = GetPlayerY(index) If level_count > 0 Then If level_count = 1 Then 'singular GlobalMsg GetPlayerName(index) & " has gained " & level_count & " level!", Brown Call SendAnimation(GetPlayerMap(index), 62, x, y) Else 'plural GlobalMsg GetPlayerName(index) & " has gained " & level_count & " levels!", Brown Call SendAnimation(GetPlayerMap(index), 62, x, y) End If SendEXP index SendPlayerData index End IfEnd Sub``` Link to comment Share on other sites More sharing options...
Warden Posted July 7, 2011 Author Share Posted July 7, 2011 well it wont give an error but in-game if i get level up it wont show the animation. Link to comment Share on other sites More sharing options...
GKO Posted July 7, 2011 Share Posted July 7, 2011 did you define what animation you want it to send, computers arent physic you know. Link to comment Share on other sites More sharing options...
Warden Posted July 7, 2011 Author Share Posted July 7, 2011 ummh animation number 62 from ingame … :O Link to comment Share on other sites More sharing options...
Rithy58 Posted July 7, 2011 Share Posted July 7, 2011 Did you make the animation?Animation Number 62 is the actual animation. Not a Animation62.bmp and stuff.You have to make a new animation number 62 in the game.Sincerely,Rithy Link to comment Share on other sites More sharing options...
Warden Posted July 7, 2011 Author Share Posted July 7, 2011 shit lol,it works now,i had the animation thingy before but it must been deleted,thanks for reminding me :P Link to comment Share on other sites More sharing options...
shengbeng Posted July 9, 2011 Share Posted July 9, 2011 @Smore:> Its not scripting, its coding. Scripting is in a notepad :PReally? Link to comment Share on other sites More sharing options...
Rithy58 Posted July 9, 2011 Share Posted July 9, 2011 @shengbeng:> Really?Please tell me you were being sarcastic.Sincerely,Rithy 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