Eviltyphoon Posted January 16, 2009 Author Share Posted January 16, 2009 Once again, I ascend from my scripting hell called MyWorld (Not that bad, but I'm gonna request a second scripter :P) to show you what I have and to ask why it doesn't work.This is what I have:``` Case 1 Call GlobalMsg("test", 0) Call Custommenushow(index, "Wanted!", "\GUI\CUSTOM\Wanted.bmp", 1) Index = 1 Player = 0 Y = 0 Do While Index <> 0 Player = Getplayername(index) If Getplayername(index) = "" Then Exit Do Else Hasbounty = Getvar("Bounty.ini", "hasbounty", Player & "") Bounty = Getvar("Bounty.ini", "bounty", Player & "") Y = Y + 20 If Hasbounty = "1" Then If Y < 200 Then Call Custommenulabel(index, 8, Player & " has a bounty of " & Bounty & " Gold.", 20, Y & "", 10, 0, 0, 400, 20) End if End if Index = Index + 1 End if Loop Exit Sub```What this should do is this: I step on the tile, a custom menu shows up that lists all people who have a bounty. Now, the menu shows, but it only seems to show 1 person. The ini contains this:```[bounty]test=500aaa=5000[hasbounty]test=1aaa=1```Also, I set up the data.ini in my test server to show script errors and I get this:```TYPE: Subscript out of rangeLINE: 17COLUMN: 0CODE:```So, I was hoping someone here could fix this for me.Thx in advance,Eviltyphoon Link to comment Share on other sites More sharing options...
Akselj Posted January 16, 2009 Share Posted January 16, 2009 Where do you have the script? Link to comment Share on other sites More sharing options...
Eviltyphoon Posted January 16, 2009 Author Share Posted January 16, 2009 Scripted tiles. Link to comment Share on other sites More sharing options...
Akselj Posted January 16, 2009 Share Posted January 16, 2009 Then you need to remove Index = 1, Player = 0 and Y = 0 and replace Y = Y + 20 with Y = 20 and remove quotations in "1", since you only put quotation marks around strings, and remove Index = Index + 1\. If i get the function of the script right, it should work then. If this is right, then all you need to do is add more custom menu labels. Link to comment Share on other sites More sharing options...
Eviltyphoon Posted January 16, 2009 Author Share Posted January 16, 2009 -_-' I need those thing for the loop.If I remove that, then it will not loop… Which is what I want it to do. Link to comment Share on other sites More sharing options...
Akselj Posted January 16, 2009 Share Posted January 16, 2009 But fix the "1" to 1\. And add more labels else it will only show one player. Link to comment Share on other sites More sharing options...
Eviltyphoon Posted January 16, 2009 Author Share Posted January 16, 2009 Actually, when I remove the quotations, it gives me an error about that :( Link to comment Share on other sites More sharing options...
Akselj Posted January 16, 2009 Share Posted January 16, 2009 Weird…. Link to comment Share on other sites More sharing options...
Eviltyphoon Posted January 17, 2009 Author Share Posted January 17, 2009 So, I managed to track down the error to this line:``` Player = Getplayername(index)```But, I don't see anything that is wrong with it :/ Link to comment Share on other sites More sharing options...
Akselj Posted January 17, 2009 Share Posted January 17, 2009 There isn't Link to comment Share on other sites More sharing options...
DarkMazer Posted January 17, 2009 Share Posted January 17, 2009 Try removing this line:```Player = 0``` Link to comment Share on other sites More sharing options...
Eviltyphoon Posted January 17, 2009 Author Share Posted January 17, 2009 Nope, same error Link to comment Share on other sites More sharing options...
Akselj Posted January 17, 2009 Share Posted January 17, 2009 You have a COMPLETLEY working Main.txt? Link to comment Share on other sites More sharing options...
Eviltyphoon Posted January 17, 2009 Author Share Posted January 17, 2009 Yup Link to comment Share on other sites More sharing options...
Eviltyphoon Posted January 20, 2009 Author Share Posted January 20, 2009 Bump. I really need this fixed. Link to comment Share on other sites More sharing options...
Akselj Posted January 20, 2009 Share Posted January 20, 2009 This is a hard nut…. You should ask one of the Epic scripters like Baron or Balliztik, try PM'ing them. Link to comment Share on other sites More sharing options...
Akselj Posted January 24, 2009 Share Posted January 24, 2009 Maybe I got the solution: Are both players online? Sorry for double but then thread bumos. Link to comment Share on other sites More sharing options...
Eviltyphoon Posted January 25, 2009 Author Share Posted January 25, 2009 Nope, must have something to do with that, I was thinking that way already… But there is no command to get a playername when he/she is offline, is there? Link to comment Share on other sites More sharing options...
Akselj Posted January 25, 2009 Share Posted January 25, 2009 No, because they use Index and Index is number of player which you see in server. Link to comment Share on other sites More sharing options...
Eviltyphoon Posted January 26, 2009 Author Share Posted January 26, 2009 As I thought… :(But I'm working out an other way to do this. Link to comment Share on other sites More sharing options...
Akselj Posted January 26, 2009 Share Posted January 26, 2009 It might be in EE 3.0, requested in wishlist. 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