i'm going make new lua
and get new error :
1
LUA ERROR: C stack overflow
how to fix ?
hey help me
edited 1×, last 11.05.11 01:54:35 pm
LUA ERROR: C stack overflow
lua_checkstack(lua_state,extra_space)
----Zombie Lua--- --lua by kalis -- function Array(size,value) 	local array = {} 	for i = 1, size do 		array[i]=value 	end 	return array end zombie = Array(32,0) image_z = Array(32,0) z_score = Array(32,0) addhook("team","team") function team(id,t) 	if t == 0 and player(id,"exists") then 		parse("makect "..id) 	end 	if t == 0 and player(id,"exists") then 		z_score[id] = 0 	end 	if t == 1 then 		zombie[id] = 1 	end 	if zombie[id] == 1 then 		parse("maket "..id) 		return 1 	end end addhook("startround","start") function start() 	for id = 1,32 do 		z_score[id] = 0 	end 	if player(0,'table') then 		one_vam = 0 	end 	local vampire = player(0,'table') 	for i = 1, #player(0,"table") do 		if player(vampire[i],'exists') and one_vam == 0 then 			one_vam = 1 			parse('maket '..vampire[i]) 		end 	end end addhook("move","z_spawn") function z_spawn(id) if player(0,"table") then 	if zombie[id]==1 then 		if z_score[id] == 1 then 			freeimage(image_z[id]) 			image_z[id] = image("gfx/zombie.bmp",player(id,"x"),player(id,"y"),132+id) 			imagealpha(image_z[id],1) 		end 		if z_score[id]==2 then 			freeimage(image_z[id]) 			image_z[id] = image("gfx/zombie.bmp",player(id,"x"),player(id,"y"),132+id) 			imagealpha(image_z[id],0.5) 		end 	end end end addhook("kill","z_kill") function z_kill(killer,victim,wpn) 	if zombie[killer] == 1 then 		z_score[killer] = z_score[killer] + 1 		msg2(victim,"©212212212You get died by "..player(killer,"name")) 		parse("maket "..victim) 		return 1 	end end addhook("say","z_say") function z_say(id,txt) if txt=="star" then 	msg2(id,"your score : "..z_score[id].." .") end end
addhook("move","z_spawn") function z_spawn(id) if player(0,"table") then if zombie[id]==1 then if z_score[id] == 1 then freeimage(image_z[id]) image_z[id] = image("gfx/zombie.bmp",player(id,"x"),player(id,"y"),132+id) imagealpha(image_z[id],1) end if z_score[id]==2 then freeimage(image_z[id]) image_z[id] = image("gfx/zombie.bmp",player(id,"x"),player(id,"y"),132+id) imagealpha(image_z[id],0.5) end end end end
ddhook("move","z_spawn") function z_spawn(id) if player(0,"table") then 	if zombie[id]==1 then local da_zombie_x = player(id,"x") local da_zombie_y = player(id,"y") 		if z_score[id] == 1 then 			freeimage(image_z[id]) 			image_z[id] = image("gfx/zombie.bmp",da_zombie_x,_da_zombie_y,132+id) 			imagealpha(image_z[id],1) 		elseif z_score[id] == 2 then 			freeimage(image_z[id]) 			image_z[id] = image("gfx/zombie.bmp",da_zombie_x,_da_zombie_y,132+id) 			imagealpha(image_z[id],0.5) 		end 	end end end
if t == 1 then 		parse("maket "..id) 		return 1 	end
addhook("team","teamcheck") function teamcheck(id) 	if player(id,"team")==2 then 		parse("maket "..id) 	end 	if player(id,"team")==0 then 		parse("maket "..id) 	end 	if player(id,"team")==1 then 		parse("makect "..id) 	end end