SnoopCat Posted October 6, 2011 Share Posted October 6, 2011 hello i was checking my server debugscript 3 and this is what i get. here is the line its says where is the problem: function updateSpecs() local snr = 0 for k, v in ipairs(getElementsByType("player")) do if (getElementData(v, 'Player.Name')) then if getElementData(v, 'spectates') == getLocalPlayer() then snr = snr + 1 end end end stext = tostring("Spectators: "..snr) g_dxGUI['spectators']:text(stext) end im a little noob on scripting so idk what must be the problem... can someone helps me? Link to comment
SnoopCat Posted October 6, 2011 Author Share Posted October 6, 2011 srry but any help plZ? Link to comment
JR10 Posted October 6, 2011 Share Posted October 6, 2011 Where is g_dxGUI defined and where is g_dxGUI['spectators'] defined? Link to comment
SnoopCat Posted October 6, 2011 Author Share Posted October 6, 2011 umm srry but i dont understand Link to comment
JR10 Posted October 6, 2011 Share Posted October 6, 2011 g_dxGUI['spectators']:text(stext) Where is that defined? Link to comment
SnoopCat Posted October 6, 2011 Author Share Posted October 6, 2011 humm can i send u my race client via pm? cuz i dont want to post it here.. Link to comment
JR10 Posted October 6, 2011 Share Posted October 6, 2011 You must use dxText:create first, you are doing: g_dxGUI['spectators']:text(stext) Without creating the text. g_dxGUI = dxText:create ( ... ) Link to comment
SnoopCat Posted October 6, 2011 Author Share Posted October 6, 2011 can u send me the race_client via pm plz? i mean the fixed one. Link to comment
JR10 Posted October 6, 2011 Share Posted October 6, 2011 I can't fix it, since I don't know the purpose of spectators. The part where there is local g_dxGUI = { You got a lot of dxText:create Add one for spectators. Link to comment
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