NoHero Posted March 8, 2014 Share Posted March 8, 2014 I was originally asked to modify a autolevel lua script seen the same script in slight different forms around the internet. Thing is both in the original scrip and my modified one i get the same problem: return et.gentity_get(pID, "ps.persistant", 0) returns 0 when the players XP is not 0. Is ps.persistant the right fieldname for XP? I bypassed this section of code and everything else in my script works last nail to be done before implementing it. Quote Link to comment Share on other sites More sharing options...
Management gaoesa Posted March 8, 2014 Management Share Posted March 8, 2014 Here is our documentation of Lua http://mygamingtalk.com/wiki/index.php/Silent_Lua#gentity_get. If following it doesn't result correct output, there is a bug. The index 0 is indeed correct index for the score within the ps.persistant. Please provide a full test case script that is able to reproduce the issue as a bug report. Include only what is relevant to the issue. Quote Link to comment Share on other sites More sharing options...
Zelly Posted March 9, 2014 Share Posted March 9, 2014 If I remember correctly xp will show as 0 until at least one xp is gained in the round/map. (Bugged the hell out of me when testing) This was a long time ago though when I was testing on etpub, so I am unsure if this is still the case in silent mod. NoHero and gaoesa 2 Quote Link to comment Share on other sites More sharing options...
NoHero Posted March 9, 2014 Author Share Posted March 9, 2014 (edited) If I remember correctly xp will show as 0 until at least one xp is gained in the round/map. (Bugged the hell out of me when testing) This was a long time ago though when I was testing on etpub, so I am unsure if this is still the case in silent mod.Thanks, that was messing me up everything was working i just didn't realise ^^ Edited March 9, 2014 by NoHero Quote Link to comment Share on other sites More sharing options...
Management gaoesa Posted March 9, 2014 Management Share Posted March 9, 2014 Additionally, the "ps.persistant" is probably not a good way to get the score. The better way to get the XP should be to calculate "sess.skillpoints" array values together. This way it won't be necessary to check if the player is in a team, dead or if he is speccing and the returned result will be correct. The ps (playerstate) values depend a lot on what the player is doing. NoHero 1 Quote Link to comment Share on other sites More sharing options...
NoHero Posted March 9, 2014 Author Share Posted March 9, 2014 Additionally, the "ps.persistant" is probably not a good way to get the score. The better way to get the XP should be to calculate "sess.skill" array values together. This way it won't be necessary to check if the player is in a team, dead or if he is speccing and the returned result will be correct. The ps (playerstate) values depend a lot on what the player is doing.Thanks for the tip, i will definitely use it since my next project will need to get XP again. Quote Link to comment Share on other sites More sharing options...
Management gaoesa Posted March 9, 2014 Management Share Posted March 9, 2014 I needed to correct my post a bit, I wrote "sess.skill", but the correct array is "sess.skillpoints". The "sess.skill" is the stars level of the player in each of the areas. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.