Recently, I've a problem that I can't solve. I don't really know about math if the problem is related to math, so this may be a problem that can't be solved alone. This problem is very easy for you if you are smart enough. Let's look at the code which creates the problem first:
local tile_x, tile_y = getteamdomination (team, "x")[spawn_point] + between_tile_x, getteamdomination (team, "y")[spawn_point] + between_tile_y
This is the function associated with the code above:
local function getteamdomination (team, variable) 	if (team == 1) then 		return conquest.t.domination[variable] 	elseif (team == 2) then 		return conquest.ct.domination[variable] 	end end
For the problem:
LUA ERROR: sys/lua/samples/conquest.lua:317: attempt to perform arithmetic on field '?' (a nil value)
The code above is in the different block. The function above works fine. I've tried to print the code above in the form of a string. It didn't help because the problem has been nil and the printed string made nil as well. To make you more understand about the other variable that connected to the source problem:
local team = player (id, "team")
local spawn_point = math.random (getteamdomination (team, "point")) local between_tile_x, between_tile_y = math.random (-2, 2), math.random (-2, 2)
Do you understand the issue? Even the smallest problem I still don't know why it could have errors. I've explained everything you need to know in dealing with my problem. If you want more explanation, ask.