micheal1230 Posted June 15, 2012 Share Posted June 15, 2012 Error: Client: addEventHandler("onClientRender", root, function() local redp = countPlayersInTeam("Red Team") local bluep = countPlayersInTeam("Blue Team") local screenWidth, screenHeight = guiGetScreenSize() local ax, ay = screenWidth - 34, 70 local ax1, ay1 = screenWidth - 34, 65 dxDrawText("Red Team:".. redp .. "", ax,ay ) dxDrawText("Blue Team:".. bluep .. "", ax1,ay1 ) end ) Link to comment
TAPL Posted June 15, 2012 Share Posted June 15, 2012 addEventHandler("onClientRender", root, function() local redp = countPlayersInTeam(getTeamFromName("Red Team")) local bluep = countPlayersInTeam(getTeamFromName("Blue Team")) local screenWidth, screenHeight = guiGetScreenSize() local ax, ay = screenWidth - 34, 70 local ax1, ay1 = screenWidth - 34, 65 dxDrawText("Red Team:"..redp, ax,ay) dxDrawText("Blue Team:"..bluep, ax1,ay1) end) Link to comment
micheal1230 Posted June 15, 2012 Author Share Posted June 15, 2012 addEventHandler("onClientRender", root, function() local redp = countPlayersInTeam(getTeamFromName("Red Team")) local bluep = countPlayersInTeam(getTeamFromName("Blue Team")) local screenWidth, screenHeight = guiGetScreenSize() local ax, ay = screenWidth - 34, 70 local ax1, ay1 = screenWidth - 34, 65 dxDrawText("Red Team:"..redp, ax,ay) dxDrawText("Blue Team:"..bluep, ax1,ay1) end) Same Error Link to comment
TAPL Posted June 15, 2012 Share Posted June 15, 2012 addEventHandler("onClientRender", root, function() local redp = countPlayersInTeam(getTeamFromName("Red Team")) local bluep = countPlayersInTeam(getTeamFromName("Blue Team")) local screenWidth, screenHeight = guiGetScreenSize() local ax, ay = screenWidth - 34, 70 local ax1, ay1 = screenWidth - 34, 65 dxDrawText("Red Team:"..tostring(redp), ax,ay) dxDrawText("Blue Team:"..tostring(bluep), ax1,ay1) end) Link to comment
micheal1230 Posted June 15, 2012 Author Share Posted June 15, 2012 addEventHandler("onClientRender", root, function() local redp = countPlayersInTeam(getTeamFromName("Red Team")) local bluep = countPlayersInTeam(getTeamFromName("Blue Team")) local screenWidth, screenHeight = guiGetScreenSize() local ax, ay = screenWidth - 34, 70 local ax1, ay1 = screenWidth - 34, 65 dxDrawText("Red Team:"..tostring(redp), ax,ay) dxDrawText("Blue Team:"..tostring(bluep), ax1,ay1) end) bad arg @ countPlayersInTeam Line 3 and 4 Link to comment
TAPL Posted June 15, 2012 Share Posted June 15, 2012 Do You have Teams with name 'Red Team' and 'Blue Team' ? seems like you don't. Link to comment
micheal1230 Posted June 15, 2012 Author Share Posted June 15, 2012 Do You have Teams with name 'Red Team' and 'Blue Team' ?seems like you don't. They are addEventHandler("onResourceStart",root function(thePlayer) createTeam("Red Team" 255,0,0) createTeam("Blue Team" 0,0,255) end ) Link to comment
Castillo Posted June 15, 2012 Share Posted June 15, 2012 Try with this: local redTeam = getTeamFromName ( "Red Team" ) local blueTeam = getTeamFromName ( "Blue Team" ) addEventHandler ( "onClientRender", root, function ( ) local redp = countPlayersInTeam ( redTeam ) local bluep = countPlayersInTeam ( blueTeam ) local screenWidth, screenHeight = guiGetScreenSize ( ) local ax, ay = ( screenWidth - 34 ), 70 local ax1, ay1 = ( screenWidth - 34 ), 65 dxDrawText ( "Red Team:".. tostring ( redp ), ax, ay ) dxDrawText ( "Blue Team:".. tostring ( bluep ), ax1, ay1 ) end ) Link to comment
TAPL Posted June 15, 2012 Share Posted June 15, 2012 Do You have Teams with name 'Red Team' and 'Blue Team' ?seems like you don't. They are addEventHandler("onResourceStart",root function(thePlayer) createTeam("Red Team" 255,0,0) createTeam("Blue Team" 0,0,255) end ) you forgot to put ',' after "RedTeam" and "Blue Team" addEventHandler("onResourceStart",resourceRoot function() createTeam("Red Team",255,0,0) createTeam("Blue Team",0,0,255) end) Link to comment
micheal1230 Posted June 15, 2012 Author Share Posted June 15, 2012 Do You have Teams with name 'Red Team' and 'Blue Team' ?seems like you don't. They are addEventHandler("onResourceStart",root function(thePlayer) createTeam("Red Team" 255,0,0) createTeam("Blue Team" 0,0,255) end ) you forgot to put ',' after "RedTeam" and "Blue Team" addEventHandler("onResourceStart",resourceRoot function() createTeam("Red Team",255,0,0) createTeam("Blue Team",0,0,255) end) Same Error Stupid countPlayersInTeam addEvent("tdmstart", true) addEventHandler("tdmstart",root, addEventHandler("onClientRender", root, function() local redteamname = getTeamFromName("Red Team") local blueteamname = getTeamFromName("Blue Team") local redp = countPlayersInTeam( redteamname ) local bluep = countPlayersInTeam( blueteamname ) local screenWidth, screenHeight = guiGetScreenSize() local ax, ay = screenWidth - 90, 200 local ax1, ay1 = screenWidth - 92, 180 dxDrawText("Red Team: "..tostring(redp), ax,ay) dxDrawText("Blue Team: "..tostring(bluep), ax1,ay1) end) ) Link to comment
TAPL Posted June 15, 2012 Share Posted June 15, 2012 addEventHandler("onResourceStart",resourceRoot, function() createTeam("Red Team",255,0,0) createTeam("Blue Team",0,0,255) end) Link to comment
micheal1230 Posted June 15, 2012 Author Share Posted June 15, 2012 addEventHandler("onResourceStart",resourceRoot, function() createTeam("Red Team",255,0,0) createTeam("Blue Team",0,0,255) end) If you noticed i missed the comma i just noticed it because i got a error addEventHandler("onResourceStart",root function(thePlayer) createTeam("Red Team", 255,0,0) createTeam("Blue Team", 0,0,255) end ) 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