Page 1 of 2

Syntax error ????

Posted: Sun Sep 26, 2004 4:57 pm
by agentmad007
hi all


The arrays script was done by Bdbodger, but when i add it to my map script nothing work , like if there were a syntax error.

when i take off this part of script everything work fine ( moving objects, hided objects etc etc):
I guess something is bad writted......

can someone spot the error plz , i am bad with arrays

thanks you

Code: Select all




tele_porter1: 

local.player = parm.other

try_again1:
 
for(local.i=1;local.i <= $tunnel_destination1.size;local.i++) 
{ 
   if($tunnel_destination1[local.i].isused != 1) 
   {

	$tunnel_destination1[local.i].isused = 1
	local.player tele $tunnel_destination1[local.i].origin


local.player playsound vortex
//local.player freezeplayer
local.player physics_off
local.mover = spawn script_model model "fx/dummy.tik"
local.mover.origin =  local.player.origin
local.player glue local.mover
local.mover time 2
local.mover moveto $t1
local.mover waitmove
local.player unglue local.mover
local.mover remove
local.player tele $egypt_destination
//local.player releaseplayer
local.player physics_on




	wait 2

	while(local.player.is_teled != 1)
	{
		for(local.a =1;local.a <= $egypt_destination.size;local.a++) 
		{ 
  			if($egypt_destination[local.a].isused != 1) 
 			{ 
				local.player.is_teled = 1
    				local.player tele $egypt_destination[local.a].origin 
				$tunnel_destination1[local.i].isused = 0
  			} 
		}

		waitframe
	}
   }

if(local.player.is_teled == 1)
{
local.player.is_teled = 0
end
}

waitframe

goto try_again1

} 
end 

tele_check1: 

local.player = parm.other
self.isused = 1 
while(local.player is touching self) 
waitframe 
self.isused = 0 
end 


tele_porter2: 

local.player = parm.other

try_again2:
 
for(local.i=1;local.i <= $tunnel_destination2.size;local.i++) 
{ 
   if($tunnel_destination2[local.i].isused != 1) 
   {

	$tunnel_destination2[local.i].isused = 1
	local.player tele $tunnel_destination2[local.i].origin


local.player playsound vortex
//local.player freezeplayer
local.player physics_off
local.mover = spawn script_model model "fx/dummy.tik"
local.mover.origin =  local.player.origin
local.player glue local.mover
local.mover time 2
local.mover moveto $t2
local.mover waitmove
local.player unglue local.mover
local.mover remove
local.player tele $stargate_destination
//local.player releaseplayer
local.player physics_on




	wait 2

	while(local.player.is_teled != 1)
	{
		for(local.a =1;local.a <= $stargate_destination.size;local.a++) 
		{ 
  			if($stargate_destination[local.a].isused != 1) 
 			{ 
				local.player.is_teled = 1
    				local.player tele $stargate_destination[local.a].origin 
				$tunnel_destination2[local.i].isused = 0
  			} 
		}

		waitframe
	}
   }

if(local.player.is_teled == 1)
{
local.player.is_teled = 0
end
}

waitframe

goto try_again2

} 
end 

tele_check2: 

local.player = parm.other
self.isused = 1 
while(local.player is touching self) 
waitframe 
self.isused = 0 
end 







ring_teleporter1:

//ring time 

	
	$ring1 time .3
	$ring2 time .3
	$ring3 time .3
	$ring4 time .3
	$ring5 time .3
	$ring1_1 time .3
	$ring2_2 time .3
	$ring3_3 time .3
	$ring4_4 time .3
	$ring5_5 time .3
	thread tele_porter3

end


tele_porter3: 

local.player = parm.other

try_again3:

$ring_trigger waittill trigger 

	local.player playsound ring
	$ring1 movedown 200
	$ring1 waitmove
	$ring1_1 movedown 200
	$ring1_1 waitmove 
	$ring2 movedown 200
	$ring2 waitmove 
	$ring2_2 movedown 200
	$ring2_2 waitmove
	$ring3 movedown 200
	$ring3 waitmove 
	$ring3_3 movedown 200
	$ring3_3 waitmove
	$ring4 movedown 200
	$ring4 waitmove 
	$ring4_4 movedown 200
	$ring4_4 waitmove
	$ring5 movedown 200
	$ring5 waitmove 
	$ring5_5 movedown 200
	$ring5_5 waitmove
	$ringteleport_trigger triggerable
	$ring_trigger nottriggerable


	$ring5 moveup 200
	$ring5 waitmove 
	$ring5_5 moveup 200
	$ring5_5 waitmove
	$ring4 moveup 200
	$ring4 waitmove
	$ring4_4 moveup 200
	$ring4_4 waitmove  
	$ring3 moveup 200
	$ring3 waitmove 
	$ring3_3 moveup 200
	$ring3_3 waitmove 
	$ring2 moveup 200
	$ring2 waitmove
	$ring2_2 moveup 200
	$ring2_2 waitmove 
	$ring1 moveup 200
	$ring1 waitmove 
	$ring1_1 moveup 200
	$ring1_1 waitmove 
	wait 3
	$ring_trigger triggerable
	

 
for(local.i=1;local.i <= $ring_destination1.size;local.i++) 
{ 
   if($ring_destination1[local.i].isused != 1) 
   {

	$ring_destination1[local.i].isused = 1
	local.player tele $ring_destination1[local.i].origin

waitframe

if(local.player.is_teled == 1)
{
local.player.is_teled = 0
end
}

waitframe

goto ring_teleporter1

} 
end 

tele_check3: 

local.player = parm.other
self.isused = 1 
while(local.player is touching self) 
waitframe 
self.isused = 0 
end 


ring_teleporter2:

//ring time 

	
	$ring1 time .3
	$ring2 time .3
	$ring3 time .3
	$ring4 time .3
	$ring5 time .3
	$ring1_1 time .3
	$ring2_2 time .3
	$ring3_3 time .3
	$ring4_4 time .3
	$ring5_5 time .3
	thread tele_porter4

end


tele_porter4: 

local.player = parm.other

try_again3:

$ring_trigger2 waittill trigger 

	local.player playsound ring
	$ring1 movedown 200
	$ring1 waitmove
	$ring1_1 movedown 200
	$ring1_1 waitmove 
	$ring2 movedown 200
	$ring2 waitmove 
	$ring2_2 movedown 200
	$ring2_2 waitmove
	$ring3 movedown 200
	$ring3 waitmove 
	$ring3_3 movedown 200
	$ring3_3 waitmove
	$ring4 movedown 200
	$ring4 waitmove 
	$ring4_4 movedown 200
	$ring4_4 waitmove
	$ring5 movedown 200
	$ring5 waitmove 
	$ring5_5 movedown 200
	$ring5_5 waitmove
	$ringteleport_trigger2 triggerable
	$ring_trigger nottriggerable


	$ring5 moveup 200
	$ring5 waitmove 
	$ring5_5 moveup 200
	$ring5_5 waitmove
	$ring4 moveup 200
	$ring4 waitmove
	$ring4_4 moveup 200
	$ring4_4 waitmove  
	$ring3 moveup 200
	$ring3 waitmove 
	$ring3_3 moveup 200
	$ring3_3 waitmove 
	$ring2 moveup 200
	$ring2 waitmove
	$ring2_2 moveup 200
	$ring2_2 waitmove 
	$ring1 moveup 200
	$ring1 waitmove 
	$ring1_1 moveup 200
	$ring1_1 waitmove 
	wait 3
	$ring_trigger2 triggerable
	

 
for(local.i=1;local.i <= $ring_destination2.size;local.i++) 
{ 
   if($ring_destination2[local.i].isused != 1) 
   {

	$ring_destination2[local.i].isused = 1
	local.player tele $ring_destination2[local.i].origin

waitframe

if(local.player.is_teled == 1)
{
local.player.is_teled = 0
end
}

waitframe

goto ring_teleporter2

} 
end 

tele_check4: 

local.player = parm.other
self.isused = 1 
while(local.player is touching self) 
waitframe 
self.isused = 0 

end 

end

Posted: Sun Sep 26, 2004 8:02 pm
by jv_map
Console will tell what's wrong :idea:

Posted: Sun Sep 26, 2004 8:53 pm
by agentmad007
nothing in console.exept the stuff i have to add in precache.

Posted: Sun Sep 26, 2004 10:51 pm
by lizardkid
type in logfile 1 and restart the map. post the logfile here.

Posted: Sun Sep 26, 2004 11:14 pm
by Bjarne BZR
Well, errors in the script syntax are often written early in the consol... and are sometimes "pushed out of the top" of the log, are U sure you have looked through ALL of the log?

Check this Error detection tutorial out.

Posted: Sun Sep 26, 2004 11:32 pm
by agentmad007
i did it also the dlog andnothing there exept the precache stuff

Code: Select all

------ Server Initialization ------
Server: lib/mp_the_final_map_lib
------- S_StopAllSounds (stop music) -------
------- S_StopAllSounds Complete-------
------- S_StopAllSounds (stop music) -------
------- S_StopAllSounds Complete-------
Setting up Shaders
UI_DrawConnect called
^~^~^ Add the following line to the *_precache.scr map script:
cache models/milkshape/stargate/stargate.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/items/item_grenade_ammobox.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/milkshape/anubis/anubis.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/milkshape/serpentlumiere/serpentlumiere.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/milkshape/angel/angel.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/milkshape/pharaon/pharaon.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/milkshape/skel3/skel3.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/milkshape/skel2/skel2.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/milkshape/skel1/skel1.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/tom_bubble.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/milkshape/dhd/dhd.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/items/item_rifle_ammobox.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/items/item_pistol_ammobox.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/animate/electrical_switch_pulse.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/animate/electrical_switch_nopulse.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/animate/naxosantenna.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/miscobj/searchlight.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/miscobj/searchlightbase.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/milkshape/cam_gauche01/cam_gauche01.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/milkshape/cam_droit01/cam_droit01.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/milkshape/cam03/cam03.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/milkshape/man2/man2.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/milkshape/man1/man1.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/emitters/generic_spark.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/milkshape/ringteleport/ringteleport.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/player/bionic_hitler.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/animate/alarmswitch.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/animate/gate_spray.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/milkshape/glyph/glyph.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/milkshape/glyphlight1/glyphlight1.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/milkshape/glyphlight2/glyphlight2.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/milkshape/glyphlight3/glyphlight3.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/milkshape/glyphlight4/glyphlight4.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/milkshape/glyphlight5/glyphlight5.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/milkshape/glyphlight6/glyphlight6.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/milkshape/glyphlight7/glyphlight7.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/milkshape/spinring/spinring.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/player/american_army.tik
------ Server Initialization Complete ------  4.83 seconds
Current search path:
C:\Program Files\EA GAMES\MOHDA\maintt\zzzzzzzzzz-lagfix101.pk3 (4 files)
C:\Program Files\EA GAMES\MOHDA\maintt\pak4.pk3 (8 files)
C:\Program Files\EA GAMES\MOHDA\maintt\pak3.pk3 (142 files)
C:\Program Files\EA GAMES\MOHDA\maintt\pak2.pk3 (1744 files)
C:\Program Files\EA GAMES\MOHDA\maintt\pak1.pk3 (7888 files)
C:\Program Files\EA GAMES\MOHDA\maintt\new_jail_sound.pk3 (4 files)
C:\Program Files\EA GAMES\MOHDA\maintt\mp_thelostvillage_lib.pk3 (39 files)
C:\Program Files\EA GAMES\MOHDA\maintt\mp_berlin_lib.pk3 (10 files)
C:\Program Files\EA GAMES\MOHDA/maintt
C:\Program Files\EA GAMES\MOHDA\main\User-NoTitleScreen.pk3 (2 files)
C:\Program Files\EA GAMES\MOHDA\main\Pak7Fr.pk3 (102 files)
C:\Program Files\EA GAMES\MOHDA\main\Pak6Fr.pk3 (602 files)
C:\Program Files\EA GAMES\MOHDA\main\Pak5.pk3 (259 files)
C:\Program Files\EA GAMES\MOHDA\main\Pak4.pk3 (593 files)
C:\Program Files\EA GAMES\MOHDA\main\Pak3.pk3 (669 files)
C:\Program Files\EA GAMES\MOHDA\main\Pak2.pk3 (4722 files)
C:\Program Files\EA GAMES\MOHDA\main\Pak1.pk3 (396 files)
C:\Program Files\EA GAMES\MOHDA\main\Pak0.pk3 (11174 files)
C:\Program Files\EA GAMES\MOHDA\main\entdefs.pk3 (23 files)
C:\Program Files\EA GAMES\MOHDA/main

handle 1: qconsole.log
----------------------
56762 files in pk3 files
------- Sound Begin Registration -------
------- S_StopAllSounds (stop music) -------
------- S_StopAllSounds Complete-------
------- Sound Begin Registration Complete -------


-----------PARSING 'aa.scr'------------
Any SetCurrentTiki errors means that tiki wasn't prefetched and tiki-specific sounds for it won't work. To fix prefetch the tiki. Ignore if you don't use that tiki on this level.
Parse/Load time: 0.017000 seconds.
-------------PARSING 'aa.scr' DONE---------------



-----------PARSING 'uberdialog.scr'------------
Any SetCurrentTiki errors means that tiki wasn't prefetched and tiki-specific sounds for it won't work. To fix prefetch the tiki. Ignore if you don't use that tiki on this level.
Parse/Load time: 0.854000 seconds.
-------------PARSING 'uberdialog.scr' DONE---------------



-----------PARSING 'ubersound.scr'------------
Any SetCurrentTiki errors means that tiki wasn't prefetched and tiki-specific sounds for it won't work. To fix prefetch the tiki. Ignore if you don't use that tiki on this level.
Parse/Load time: 2.797000 seconds.
-------------PARSING 'ubersound.scr' DONE---------------

stitched 0 LoD cracks
...loaded 30151 faces, 417 meshes, 0 trisurfs, 0 flares
R_LevelMarksLoad: maps/lib/mp_the_final_map_lib.dcl not found
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_paper_lite.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_paper_hard.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_wood_lite.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_wood_hard.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_metal_lite.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_metal_hard.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_stone_lite.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_stone_hard.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_dirt_lite.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_dirt_hard.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_grass_lite.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_grass_hard.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_mud_lite.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_mud_hard.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_water_lite.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_water_hard.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_glass_lite.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_glass_hard.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_sand_lite.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_sand_hard.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_foliage_lite.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_foliage_hard.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_snow_lite.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_snow_hard.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_carpet_lite.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_carpet_hard.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_human_uniform_lite.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_human_uniform_hard.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/water_trail_bubble.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/grenexp_base.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bazookaexp_base.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/heavyshellexp_base.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/tankexp_base.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/grenexp_paper.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/grenexp_wood.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/grenexp_metal.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/grenexp_stone.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/grenexp_dirt.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/grenexp_grass.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/grenexp_mud.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/grenexp_water.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/grenexp_gravel.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/grenexp_sand.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/grenexp_foliage.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/grenexp_snow.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/grenexp_carpet.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/heavyshellexp_dirt.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/heavyshellexp_stone.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/heavyshellexp_snow.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/tankexp_dirt.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/tankexp_stone.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/tankexp_snow.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bazookaexp_dirt.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bazookaexp_stone.tik
^~^~^ Add the following line to the *_precache.scr map script:
c


Posted: Sun Sep 26, 2004 11:33 pm
by Bjarne BZR
Also: Both tele_porter3 and tele_porter4 looks a bit strange when you tab it correctly... arent you missinf a '}' somewhere? To close the FOR loop perhaps?
Also: you have 2 end statements at the bottom... it will not cause an error, but it may be a copy/paste error, and if so an end could be missing somewhere else.

Code: Select all

tele_porter3:
	local.player = parm.other
	try_again3:
	$ring_trigger waittill trigger
	local.player playsound ring
	$ring1 movedown 200
	$ring1 waitmove
	$ring1_1 movedown 200
	$ring1_1 waitmove
	$ring2 movedown 200
	$ring2 waitmove
	$ring2_2 movedown 200
	$ring2_2 waitmove
	$ring3 movedown 200
	$ring3 waitmove
	$ring3_3 movedown 200
	$ring3_3 waitmove
	$ring4 movedown 200
	$ring4 waitmove
	$ring4_4 movedown 200
	$ring4_4 waitmove
	$ring5 movedown 200
	$ring5 waitmove
	$ring5_5 movedown 200
	$ring5_5 waitmove
	$ringteleport_trigger triggerable
	$ring_trigger nottriggerable
	$ring5 moveup 200
	$ring5 waitmove
	$ring5_5 moveup 200
	$ring5_5 waitmove
	$ring4 moveup 200
	$ring4 waitmove
	$ring4_4 moveup 200
	$ring4_4 waitmove 
	$ring3 moveup 200
	$ring3 waitmove
	$ring3_3 moveup 200
	$ring3_3 waitmove
	$ring2 moveup 200
	$ring2 waitmove
	$ring2_2 moveup 200
	$ring2_2 waitmove
	$ring1 moveup 200
	$ring1 waitmove
	$ring1_1 moveup 200
	$ring1_1 waitmove
	wait 3
	$ring_trigger triggerable
	for(local.i=1;local.i <= $ring_destination1.size;local.i++)
	{
		if($ring_destination1[local.i].isused != 1)
		{
			$ring_destination1[local.i].isused = 1
			local.player tele $ring_destination1[local.i].origin
			waitframe
			if(local.player.is_teled == 1)
			{
				local.player.is_teled = 0
				end
			}
			waitframe
			goto ring_teleporter1
		}
end
...tabing can be very useful...

Posted: Sun Sep 26, 2004 11:47 pm
by agentmad007
yes i guess its missing a { or a } somewhere , but cannot spot it , plus i am a noob with arrays i dont real know how it work .

i have tried to run alone the tele_porter1 tele_porter2 tele_porter3 tele_porter4 with my other scripts , and each time the whole script wasn't active.

so there is something missing or exceeding in those threads .

help plz

Posted: Sun Sep 26, 2004 11:53 pm
by Bjarne BZR
I suggest adding a lot of print commands while develping t see if and what is executed.

Posted: Sun Sep 26, 2004 11:57 pm
by agentmad007
uh? how lol ....i think only bdbodger can solve it , he is the owner of this script , but can i know how to check wich part of script work ?

teleport

Posted: Mon Sep 27, 2004 4:10 am
by tltrude
Try taking out only one teleporter at a time. IF the script does not fail, then that is the bad one.

Is it crashing back to the desktop?

---------------------------------------------------------------------

Why is this line still in the script (twice)?

local.player tele $stargate_destination

That is done the while loops too, so you have too many "tele" commands, I think. Also some say stargate and some say tunnel in the same loop, so I think you did not change all the names correctly.

You need to get one working before you add more.

Posted: Mon Sep 27, 2004 9:13 pm
by agentmad007
Hi tom ;)

I ve tried one by one before it dont work .

And the script i ve just pasted it when bdbodger writted it , the only i ve changed is tele_porter1 instead of tele_porter ,telecheck1 instead of telecheck, tunnel_destibation1 in the arrays script.....

i Did not add any tele command .....

Posted: Mon Sep 27, 2004 9:37 pm
by agentmad007
i ve find the error whooohooooooooo

it was writting local.player is touching self , instead of local.player istouching self

hurrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrra.

Now i need to make it work properly ,it freeze on tunnel and then tel?port after 2 sec

Posted: Tue Sep 28, 2004 11:18 am
by bdbodger
He needs two tele's because 1 tele's to the tunnel the other to the final destination also he added to the code I gave him . Try this out 007

Code: Select all

tele_porter1:

local.player = parm.other

try_again1:
 
for(local.i=1;local.i <= $tunnel_destination1.size;local.i++)
{
   if($tunnel_destination1[local.i].isused != 1)
   {

   $tunnel_destination1[local.i].isused = 1
   local.player tele $tunnel_destination1[local.i].origin


local.player playsound vortex
//local.player freezeplayer
local.player physics_off
local.mover = spawn script_model model "fx/dummy.tik"
local.mover.origin =  local.player.origin
local.player glue local.mover
local.mover time 2
local.mover moveto $t1
local.mover waitmove
local.player unglue local.mover
local.mover remove

////////////////////// this is replaced by the while loop below /////////////////

//local.player tele $egypt_destination

////////////////////////////////////////////////////////////////////////////////

//local.player releaseplayer
local.player physics_on




   wait 2 ///////////// here is your 2 second wait /////////////////////////////

   while(local.player.is_teled != 1)
   {
      for(local.a =1;local.a <= $egypt_destination.size;local.a++)
      {
           if($egypt_destination[local.a].isused != 1)
          {
            local.player.is_teled = 1
                local.player tele $egypt_destination[local.a].origin
            $tunnel_destination1[local.i].isused = 0
           }
      }

      waitframe
   }
   }

if(local.player.is_teled == 1)
{
local.player.is_teled = 0
end
}

waitframe

goto try_again1

}
end

tele_check1: ////// make sure your $egypt_destination's use setthread to start this thread when triggered //////

local.player = parm.other
self.isused = 1
while(local.player istouching self)
waitframe
self.isused = 0
end
[code]

Posted: Tue Sep 28, 2004 11:24 am
by bdbodger
One other thing you don't need more than one of this thread just have all end triggers use setthread to run this thread it just marks the triggers isused as long as the player who triggers it istouching it so all of your end trigger can used it no matter what tunnel it is for .

tele_check: ////// make sure your $egypt_destination's use setthread to start this thread when triggered //////

local.player = parm.other
self.isused = 1
while(local.player istouching self)
waitframe
self.isused = 0
end