SnoopCat Posted October 6, 2011 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?
JR10 Posted October 6, 2011 Posted October 6, 2011 Where is g_dxGUI defined and where is g_dxGUI['spectators'] defined?
JR10 Posted October 6, 2011 Posted October 6, 2011 g_dxGUI['spectators']:text(stext) Where is that defined?
SnoopCat Posted October 6, 2011 Author Posted October 6, 2011 humm can i send u my race client via pm? cuz i dont want to post it here..
JR10 Posted October 6, 2011 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 ( ... )
SnoopCat Posted October 6, 2011 Author Posted October 6, 2011 can u send me the race_client via pm plz? i mean the fixed one.
JR10 Posted October 6, 2011 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.
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