xppxdd Posted October 31, 2011 Author Share Posted October 31, 2011 I want to Declare vars that hold some player data, like level, stats and stuff.Iv'e tried using :in the sub "UpdateDescWindow" (ye i know.. i need this to check whether the LevelReq of an item is bigger then the player level.)```Dim plvl As LongDim index as longplvl = Player(index).LevelfrmMain.lblPlevel = plvl```also with Player(index).StatAnyone :Z Link to comment Share on other sites More sharing options...
Ryujin Posted October 31, 2011 Share Posted October 31, 2011 ```Dim plvl As LongDim index as longplvl = Get.Player(index).LevelfrmMain.lblPlevel = plvl``` Link to comment Share on other sites More sharing options...
xppxdd Posted October 31, 2011 Author Share Posted October 31, 2011 LOL ??Wait but its giving me an error: expected expression:O Link to comment Share on other sites More sharing options...
Yxxe Posted October 31, 2011 Share Posted October 31, 2011 @Ryujin:> ```> Dim plvl As Long> Dim index as long> plvl = Get.Player(index).Level> > frmMain.lblPlevel = plvl> > ```O_o No..```Dim plvl As LongDim index as longplvl = Player(index).LevelfrmMain.lblPlevel.caption = plvl```Or, alternatively:```frmMain.lblPlevel.caption = Player(index).Level``` Link to comment Share on other sites More sharing options...
xppxdd Posted October 31, 2011 Author Share Posted October 31, 2011 @Lightning:> O_o No..> > ```> Dim plvl As Long> Dim index as long> plvl = Player(index).Level> > frmMain.lblPlevel.caption = plvl> > ```> Or, alternatively:> > ```> frmMain.lblPlevel.caption = Player(index).Level> ```@Lightning:> O_o No..> > ```> Dim plvl As Long> Dim index as long> plvl = Player(index).Level> > frmMain.lblPlevel.caption = plvl> > ```> Or, alternatively:> > ```> frmMain.lblPlevel.caption = Player(index).Level> ```umm.. read the first post, you just copy pasted what i said doesnt work :O Link to comment Share on other sites More sharing options...
Carim123 Posted October 31, 2011 Share Posted October 31, 2011 ~~No, he removed the Get.You don't need to add Get. to get data, the GetPlayerX, GetPlayerMap, etc, are simply so named functions to get data, that already exists as Player(Index).x, Player(Index).Map, and so on.~~Also, make sure you state the index exactly, because at the minute, you'd just be calling Player(0).Level.EDIT, actually, the Get was the second post, but still, you DO **need to state the index, you can't just have it as a default long value**.EDIT2, and the **caption property** too. Make sure that's there, like Lightning stated.EDIT3, when using Stat, use Stat(NumberHere) according to your stats number, to choose the stat you're wanting to call. Link to comment Share on other sites More sharing options...
xppxdd Posted October 31, 2011 Author Share Posted October 31, 2011 And how do i do that :)?i know all of that i just cant find out how to make it said the info :Zhoe do i do that the index will be the player ? Link to comment Share on other sites More sharing options...
RyokuHasu Posted November 1, 2011 Share Posted November 1, 2011 MOST subs and functions put the index in the parameters and the Index just gets passed from place to place. RANDOM EO FACT: the "Index" is the variable that is passed more than anything else in EO.```sub YourSub(ByVal index as long)frmMain.lblPlevel.caption = player( index).LevelEnd Sub```But to get the index into it you have to have its value from the last location, but that shouldn't be hard to get.BUTif you only want your index for JUST YOU, there is a global that you can use to do that (only works in the client)```sub YourSub()frmMain.lblPlevel.caption = player(MyIndex).LevelEnd Sub``` 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