willscarlet Posted January 18, 2011 Author Share Posted January 18, 2011 Hello, I waas wondering how you would go about adding 'hot keys' to the Character, inv, spells, etc tabs? I know the &Character would simply do it if the Character button was an actual command button, but not sure about it since it is a pic.Also, I added the code:frmMain.lblCharName = GetPlayerName(MyIndex) & " - Level: " GetPlayerLevel(MyIndex) & " - Class: " GetPlayerClass(MyIndex)It compiles right and works right, with the exception of it will show the data as such: Liam - Level: 1 - Class 0\. instead of Class - Warrior. Can anyone show me what I did wrong?As always I thank you for your time and help. Link to comment Share on other sites More sharing options...
Ruins of Hell Posted January 18, 2011 Share Posted January 18, 2011 Because it's supposed to work like that. GetPlayerClass returns the class number. Link to comment Share on other sites More sharing options...
Robin Posted January 18, 2011 Share Posted January 18, 2011 ```Class(GetPlayerClass(MyIndex).Name``` Link to comment Share on other sites More sharing options...
VitinhooxD Posted January 18, 2011 Share Posted January 18, 2011 @Robin:> ```> Class(GetPlayerClass(MyIndex)).Name> ```Fixed :) Link to comment Share on other sites More sharing options...
MCADAMS Posted January 18, 2011 Share Posted January 18, 2011 @Robin:> ```> Class(GetPlayerClass(MyIndex).Name> `````` frmMain.lblCharName = GetPlayerName(MyIndex) & " / Lvl: " & GetPlayerLevel(MyIndex) & Class(GetPlayerClass(MyIndex).Name```gets a syntax error :lEDIT: Thanks Vitin thats why.EDIT2: Subscript out of range rte :l Link to comment Share on other sites More sharing options...
Robin Posted January 18, 2011 Share Posted January 18, 2011 Nothing I give out is copy and paste. Use your own discretion. Link to comment Share on other sites More sharing options...
willscarlet Posted January 19, 2011 Author Share Posted January 19, 2011 frmMain.lblCharName = GetPlayerName(MyIndex) & " - Level: " & GetPlayerLevel(MyIndex) & " - Class(GetPlayerClass(MyIndex)).Name"With that code it gives me: Liam - Level 1 - Class(GetPlayerClass(MyIndex)).NameBecause of the " after.Name. But if I move it, it re puts it there on compile. If I move it after Class like the others are, It gives me a syntax error.To be honest I have tried it several different ways, I either get a syntax or compile error; or I get it to save and compile and I either see Class: Class 0 or the way I posted above.Any thoughts as to what I may be doing wrong this time? Link to comment Share on other sites More sharing options...
Fugetaboutit Posted January 19, 2011 Share Posted January 19, 2011 don't put the class(getplayer part in quotes.you can try looking at the getplayerclass function and turn it to a string, then call it and see if it'll say it. Like how getplayername is. Link to comment Share on other sites More sharing options...
Robin Posted January 19, 2011 Share Posted January 19, 2011 Read up on string concatenation. Link to comment Share on other sites More sharing options...
willscarlet Posted January 19, 2011 Author Share Posted January 19, 2011 frmMain.lblCharName = GetPlayerName(MyIndex) & " - Level: " & GetPlayerLevel(MyIndex) & " - Class: " & ClassGetPlayerClass(MyIndex)This gets me the result I am looking for, and as far as the tutorials on strings I think I am doing it right, the only thing is, that in the data file for the actual game classes, the classes are all numbered, so I get "Class: 1" or "Class 2".If I add.NAME, or .Name to the end of it to try and pull the actual classes name, is when I get the syntax errors, I did look up several tutorials on string concatenation, and I am failing to see what I am doing wrong. I am sorry to be such a bother and im sure this is just something stupid that I am overlooking, but I thank you all for you time and help. Link to comment Share on other sites More sharing options...
alsoforum Posted January 20, 2011 Share Posted January 20, 2011 @willscarlet:> ~~frmMain.lblCharName = GetPlayerName(MyIndex) & " - Level: " & GetPlayerLevel(MyIndex) & " [template website design](http://www.makeawebguide.com/)> [technical analysis](http://www.dolosward.com/public/department44.cfm)- Class(GetPlayerClass(MyIndex)).Name"With that code it gives me: Liam - Level 1 - Class(GetPlayerClass(MyIndex)).NameBecause of the " after.Name. But if I move it, it re puts it there on compile. If I move it after Class like the others are, It gives me a syntax error.[free send sms](http://text4freeonline.com)[Übersetzung Deutsch Spanisch](http://www.uebersetzungsagentur24.net/)To be honest I have tried it several different ways, I either get a syntax or compile error; or I get it to save and compile and I either see Class: Class 0 or the way I posted above. [Passages Malibu Cure](http://www.passagesmalibucure.com)[Stephen Pierce International](http://www.companypond.com/stephenpierceinternational)> > Any thoughts as to what I may be doing wrong this time?~~I just wanted to thank you for posting this message about this and I hope it helps some of the others on the board as much as its helped me. Many thanks for the help!!![online markedsføring](http://news-e-reactor.dk)[puppy teething](http://www.anythingulike.co.uk/MainCategory.aspx?p=6&cat=7) 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