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? VISIT TSW RACING SERVER http://tswracing.net/
SnoopCat Posted October 6, 2011 Author Posted October 6, 2011 srry but any help plZ? VISIT TSW RACING SERVER http://tswracing.net/
JR10 Posted October 6, 2011 Posted October 6, 2011 Where is g_dxGUI defined and where is g_dxGUI['spectators'] defined? Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
SnoopCat Posted October 6, 2011 Author Posted October 6, 2011 umm srry but i dont understand VISIT TSW RACING SERVER http://tswracing.net/
JR10 Posted October 6, 2011 Posted October 6, 2011 g_dxGUI['spectators']:text(stext) Where is that defined? Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
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.. VISIT TSW RACING SERVER http://tswracing.net/
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 ( ... ) Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
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. VISIT TSW RACING SERVER http://tswracing.net/
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. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
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