Xwad Posted October 5, 2015 Share Posted October 5, 2015 (edited) hi! My question is that why is it not spawning the bots when i start the captureAreaG1 function? Debugscript 3: ERROR: Attempt to call global 'spawnbot' (a nil value) function captureAreaG1(commandName, player) local teamG = getTeamFromName("German") GA1 = createRadarArea ( -2731.27, -2592, 250, 380, 40, 40, 40, alpha ) markerG1 = createMarker ( -2614.70, -2383.35, 14, "cylinder", 3, 255, 255, 0, 170 ) botG1 = spawnBot ( -2607.88, -2390.86, 17.35, 90, 17, 0, 0, teamG, 29, "guarding", true ) botG2 = spawnBot ( -2597.64, -2473.02, 19.22, 90, 17, 0, 0, teamG, 31, "guarding", true ) botG3 = spawnBot ( -2632.41, -2350.68, 12.76, 90, 17, 0, 0, teamG, 31, "guarding", true ) botG4 = spawnBot ( -2632.10, -2408.71, 16.60, 90, 17, 0, 0, teamG, 33, "guarding", true ) setElementHealth ( botG1, 40 ) setElementHealth ( botG2, 40 ) setElementHealth ( botG3, 40 ) setElementHealth ( botG4, 40 ) if isElement(markerA1) then destroyElement ( markerA1 ) destroyElement ( UA1 ) end end Edited October 6, 2015 by Guest Link to comment
jingzhi Posted November 19, 2015 Share Posted November 19, 2015 hi! My question is that why is it not spawning the bots when i start the captureAreaG1 function? Debugscript 3: ERROR: Attempt to call global 'spawnbot' (a nil value) function captureAreaG1(commandName, player) local teamG = getTeamFromName("German") GA1 = createRadarArea ( -2731.27, -2592, 250, 380, 40, 40, 40, alpha ) markerG1 = createMarker ( -2614.70, -2383.35, 14, "cylinder", 3, 255, 255, 0, 170 ) botG1 = spawnBot ( -2607.88, -2390.86, 17.35, 90, 17, 0, 0, teamG, 29, "guarding", true ) botG2 = spawnBot ( -2597.64, -2473.02, 19.22, 90, 17, 0, 0, teamG, 31, "guarding", true ) botG3 = spawnBot ( -2632.41, -2350.68, 12.76, 90, 17, 0, 0, teamG, 31, "guarding", true ) botG4 = spawnBot ( -2632.10, -2408.71, 16.60, 90, 17, 0, 0, teamG, 33, "guarding", true ) setElementHealth ( botG1, 40 ) setElementHealth ( botG2, 40 ) setElementHealth ( botG3, 40 ) setElementHealth ( botG4, 40 ) if isElement(markerA1) then destroyElement ( markerA1 ) destroyElement ( UA1 ) end end Post the full code 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