hi i am very new to lua and i was trying to do a converse script and nothing is poping when i click e on the npc and nothing is popping up and this is the script i did
--LUA Script - precede every function and global memeber with lowercase name script + '_main'
--player Converse
function converse_init(e)
texttime=0
stage=0
fin=0
end
function converse_main(e)
playerDist = GetPlayerDistance(e)
if playerDist < 100 then
if g_keypressE==1 and GetTimer(e)>texttime and fin==0 then
texttime=GetTimer(e)+1000
stage=stage+1
end
if stage==1 then
TextCenterOnX(50,50,3,"Hello.")
end
if stage==2 then
TextCenterOnX(50,50,3,"You are in deep shit my friend.")
end
if stage==3 then
TextCenterOnX(50,50,3,"RUN NOW!!")
end
if stage==4 then
fin=1
end
end
if PlayerDist>100 then
fin=0
stage=0
end
end
and for somrisen it does not work and cant figuar out why