OK, seems to be a few issues here.
I'm not an expert in this but here is a modified code that may work
spawntimer1 = 0
spawntimer2 = 0
function nano1_init(e)
end
function nano1_main(e)
if GetPlayerDistance <= 100 then
PromptLocal (e,"xxxxxx Production Terminal.. Press E")
end
if g_KeyPressE == 1 then
PromptDuration ("xxxx Production Started",1)
spawntimer1 = 1
--StartTimer(e) -- timer works in double precision may be an issue when used as an integer value in line 23
--GetTimer(e) not needed
end
if spawntimer1 > 0 and spawntimer2 <10 then
spawntimer2 = spawntimer2 + 1
end
if spawntimer2 == 5 then
-- you only want to spawn once so an exact number is needed
Spawn(e)
PromptDuration ("HFUIHFIUDHFDHFIODUFHDIFDHNFLKDJH")
end
end
OK, First there is an issue with the placement of your "end" commands. Since there are some if/then statements that you only wish to operate once
so the placement of the end commands is important..
Second, I've used a different timer system establishing spawntimer1 and spawntimer2 as variables that will be used to control the timing of the spawn
In order to do this and limit the number of spawns you really need two timers.
Also, because the built-in timer functions in double precision, sometimes there's a problem with hitting a specific integer value.
Also, you only want the spawn function to happen one time (I assume) so spawntimer2 is used to trigger the spawn command just that one time when spawntimer2 equals 5.
Not sure about the final PromptDuration command ????
No guarantee, but this should work. (famous last words)
Good Luck
There is no Spoon...