snkman 351 Posted February 18, 2007 Hi Guy's, well what's the different between .sqf and .sqs? If i rename my init.sqs to init.sqf and i load my mission in the Editor i get the message "error 7" and returne to the Desktop... Can i just rename all my .sqs to .sqf or what's new in .sqf? New code's? Share this post Link to post Share on other sites
Nutty_101 0 Posted February 18, 2007 Hi Guy's,well what's the different between .sqf and .sqs? If i rename my init.sqs to init.sqf and i load my mission in the Editor i get the message "error 7" and returne to the Desktop... Can i just rename all my .sqs to .sqf or what's new in .sqf? New code's? syntax of the files is your issue. In the Biki there is some information on this matter. Biki Sqf Share this post Link to post Share on other sites
kronzky 5 Posted February 19, 2007 You probably have an old goto label (#jumphere) in your .sqs file. ArmA crashes if it finds it in an .sqf script. Share this post Link to post Share on other sites
snkman 351 Posted February 19, 2007 Okay and is there a page, where i can find all change's from .sqs to .sqf? Or where do you Guy's know all that stuff from? Share this post Link to post Share on other sites
Lolsav 0 Posted February 19, 2007 From the SQF Bible Share this post Link to post Share on other sites
snkman 351 Posted February 19, 2007 From the SQF Bible There i was already... Nutty_101 gave me the same URL... I don't understand anything there Must it be that hard.. Is thee no easyer way to lear all this stuff? My brain start's burning just after i read the 1. page. Only thing i understand so far is: ~8 was changed to sleep 8 I checked all the Script's and there is no label called: "#jumphere" i always use "goto" Share this post Link to post Share on other sites
hoz 0 Posted February 19, 2007 Perhaps if you post your code here, you will get some help on whats causing the crash. Share this post Link to post Share on other sites
Lolsav 0 Posted February 19, 2007 No, there isnt a easy solution. To learn you must make an effort. And that depends on you only. Start with simple things. Learn from others scripts and try to understand how they work. Thats the best advice i can give you. Share this post Link to post Share on other sites
kronzky 5 Posted February 19, 2007 Quote[/b] ]I checked all the Script's and there is no label called: "#jumphere" i always use "goto" Yes, but that "goto" will jump somewhere. And that is what I called the "goto label". The "#jumphere" was just an example. But I'm sure you have some line in your script that starts with the pound sign (#). Take that out (along with any goto commands, since they don't exist anymore in SQF) and at least it won't crash anymore. And, as Lolsav says, there is really no easy way to learn scripting (or switching to SQF). It's not just that there are a few commands that have a different syntax, but if your old scripts used GOTOs, you will have to do some serious restructuring of your code, using the new SQF Control Structures to replace them. Best way to learn is probably to read *all* the relevant chapters on the Wiki, try out the examples until they make sense to you, then start looking at other people's code and try to make sense of it, and then start writing your own scripts. Nobody every said it was easy... Share this post Link to post Share on other sites
snkman 351 Posted February 28, 2007 Okay Guy's, i was trying last few day's to convert some script's to ".sqf" but i had no luck... Maybee someone of you would be that kind an can help me? This is a marker Script which displayed a Marker and the name of the Player at the Map. It would be greate if you just could explain me the first line of every part of this Script. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#loop ~2 _menop1 = name p1 _menop2 = name p2 _menop3 = name p3 _menop4 = name p4 _menop5 = name p5 _menop6 = name p6 _menop7 = name p7 _menop8 = name p8 _menop9 = name p9 _menop10 = name p10 _menop11 = name p11 _menop12 = name p12 ?isplayer p1: "m1" SetMarkerPos [GetPos p1 select 0, GetPos p1 select 1] ?isplayer p2: "m2" setmarkerpos [GetPos p2 select 0, GetPos p2 select 1] ?isplayer p3: "m3" setmarkerpos [GetPos p3 select 0, GetPos p3 select 1] ?isplayer p4: "m4" SetMarkerPos [GetPos p4 select 0, GetPos p4 select 1] ?isplayer p5: "m5" setmarkerpos [GetPos p5 select 0, GetPos p5 select 1] ?isplayer p6: "m6" setmarkerpos [GetPos p6 select 0, GetPos p6 select 1] ?isplayer p7: "m7" SetMarkerPos [GetPos p7 select 0, GetPos p7 select 1] ?isplayer p8: "m8" setmarkerpos [GetPos p8 select 0, GetPos p8 select 1] ?isplayer p9: "m9" setmarkerpos [GetPos p9 select 0, GetPos p9 select 1] ?isplayer p10: "m10" SetMarkerPos [GetPos p10 select 0, GetPos p10 select 1] ?isplayer p11: "m11" setmarkerpos [GetPos p11 select 0, GetPos p11 select 1] ?isplayer p12: "m12" setmarkerpos [GetPos p12 select 0, GetPos p12 select 1] ?(!isplayer p1 or !alive p1) : "m1" SetMarkerPos [0,0] ?(!isplayer p2 or !alive p2) : "m2" setmarkerpos [0,0] ?(!isplayer p3 or !alive p3) : "m3" setmarkerpos [0,0] ?(!isplayer p4 or !alive p4) : "m4" SetMarkerPos [0,0] ?(!isplayer p5 or !alive p5) : "m5" setmarkerpos [0,0] ?(!isplayer p6 or !alive p6) : "m6" setmarkerpos [0,0] ?(!isplayer p7 or !alive p7) : "m7" SetMarkerPos [0,0] ?(!isplayer p8 or !alive p8) : "m8" setmarkerpos [0,0] ?(!isplayer p9 or !alive p9) : "m9" setmarkerpos [0,0] ?(!isplayer p10 or !alive p10) : "m10" SetMarkerPos [0,0] ?(!isplayer p11 or !alive p11) : "m11" setmarkerpos [0,0] ?(!isplayer p12 or !alive p12) : "m12" setmarkerpos [0,0] "m1" setmarkertext _menop1 "m2" setmarkertext _menop2 "m3" setmarkertext _menop3 "m4" setmarkertext _menop4 "m5" setmarkertext _menop5 "m6" setmarkertext _menop6 "m7" setmarkertext _menop7 "m8" setmarkertext _menop8 "m9" setmarkertext _menop9 "m10" setmarkertext _menop10 "m11" setmarkertext _menop11 "m12" setmarkertext _menop12 goto "loop" And this is the Karte1.sqs from the Quickmap Script: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_ok = createDialog "DlgKarte1"; _gen = _this select 0; _id = _this select 2; //remove die action @ !alive Player; _gen removeAction _id; i know the "@" is the wrong sign but i have no clue what to replace the "@" with... Share this post Link to post Share on other sites
crashdome 3 Posted February 28, 2007 replace @ with waitUntil replace ~ with sleep replace ? with if replace : with then and surround the text after the : with { and } Â and end all lines with a ; example: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if (isplayer p1) then {"m1" SetMarkerPos [GetPos p1 select 0, GetPos p1 select 1]}; and you must remove the #loop and goto "loop" and replace it with a valid looping system. Can't find the thread about infinite loops... but someone will be along with the most commonly recognized one sometime soon I am guessing... Share this post Link to post Share on other sites
kronzky 5 Posted March 1, 2007 You main loop could look something like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">for [{true}, {true}, {true}] do { sleep 2; // your stuff }; (This weird syntax is actually a for...do loop that just doesn't increment. All the other control loop exit after 10,000 repeats. That's why you have to do it this way. You could also write it as "for [{_loop=0}, {_loop<1}, {_loop=_loop}] do {", and when you want to exit that loop you set the variable "_loop" to 1.) Also, when you're trying to hide markers, don't just put it at position [0,0], as that's still visible on the map. Better give it some large negative value (e.g. [-5555,-5555]). Share this post Link to post Share on other sites
snkman 351 Posted March 1, 2007 Hey CrashDome, thank you very much that was exactly, what i was looking for! And FINALLY i got my first .sqf Script's working. Just need this #loop and goto "loop" for .sqf B.t.w. is there no page avalible, where i can see all .sqf command's changed from .sqs like you told me? Well i found one with some examples but it's all in Tschech or Polish writing... .sqs to .sqf Share this post Link to post Share on other sites
snkman 351 Posted March 1, 2007 You main loop could look something like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">for [{true}, {true}, {true}] do{ sleep 2; // your stuff }; (This weird syntax is actually a for...do loop that just doesn't increment. All the other control loop exit after 10,000 repeats. That's why you have to do it this way. You could also write it as "for [{_loop=0}, {_loop<1}, {_loop=_loop}] do {", and when you want to exit that loop you set the variable "_loop" to 1.) Also, when you're trying to hide markers, don't just put it at position [0,0], as that's still visible on the map. Better give it some large negative value (e.g. [-5555,-5555]). @Kronzky Hey Kronzky why "HIDE" Marker? This Script is to give every Player a marker with his own Nick. Well i do not understand anything of what you gave me exactly but it still give's me an error on line 1 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">for [{true}, {true}, {true}] do { sleep 2; _menop1 = name p1; _menop2 = name p2; _menop3 = name p3; _menop4 = name p4; _menop5 = name p5; _menop6 = name p6; _menop7 = name p7; _menop8 = name p8; _menop9 = name p9; _menop10 = name p10; _menop11 = name p11; _menop12 = name p12; if (isplayer p1) than {"m1" SetMarkerPos [GetPos p1 select 0, GetPos p1 select 1]}; if (isplayer p2) than {"m2" setmarkerpos [GetPos p2 select 0, GetPos p2 select 1]}; if (isplayer p3) than {"m3" setmarkerpos [GetPos p3 select 0, GetPos p3 select 1]}; if (isplayer p4) than {"m4" SetMarkerPos [GetPos p4 select 0, GetPos p4 select 1]}; if (isplayer p5) than {"m5" setmarkerpos [GetPos p5 select 0, GetPos p5 select 1]}; if (isplayer p6) than {"m6" setmarkerpos [GetPos p6 select 0, GetPos p6 select 1]}; if (isplayer p7) than {"m7" SetMarkerPos [GetPos p7 select 0, GetPos p7 select 1]}; if (isplayer p8) than {"m8" setmarkerpos [GetPos p8 select 0, GetPos p8 select 1]}; if (isplayer p9) than {"m9" setmarkerpos [GetPos p9 select 0, GetPos p9 select 1]}; if (isplayer p10) than {"m10" SetMarkerPos [GetPos p10 select 0, GetPos p10 select 1]}; if (isplayer p11) than {"m11" setmarkerpos [GetPos p11 select 0, GetPos p11 select 1]}; if (isplayer p12) than {"m12" setmarkerpos [GetPos p12 select 0, GetPos p12 select 1]}; if (!isplayer p1 or !alive p1) than {"m1" SetMarkerPos [0,0]}; if (!isplayer p2 or !alive p2) than {"m2" setmarkerpos [0,0]}; if (!isplayer p3 or !alive p3) than {"m3" setmarkerpos [0,0]}; if (!isplayer p4 or !alive p4) than {"m4" SetMarkerPos [0,0]}; if (!isplayer p5 or !alive p5) than {"m5" setmarkerpos [0,0]}; if (!isplayer p6 or !alive p6) than {"m6" setmarkerpos [0,0]}; if (!isplayer p7 or !alive p7) than {"m7" SetMarkerPos [0,0]}; if (!isplayer p8 or !alive p8) than {"m8" setmarkerpos [0,0]}; if (!isplayer p9 or !alive p9) than {"m9" setmarkerpos [0,0]}; if (!isplayer p10 or !alive p10) than {"m10" SetMarkerPos [0,0]}; if (!isplayer p11 or !alive p11) than {"m11" setmarkerpos [0,0]}; if (!isplayer p12 or !alive p12) than {"m12" setmarkerpos [0,0]}; "m1" setmarkertext _menop1; "m2" setmarkertext _menop2; "m3" setmarkertext _menop3; "m4" setmarkertext _menop4; "m5" setmarkertext _menop5; "m6" setmarkertext _menop6; "m7" setmarkertext _menop7; "m8" setmarkertext _menop8; "m9" setmarkertext _menop9; "m10" setmarkertext _menop10; "m11" setmarkertext _menop11; "m12" setmarkertext _menop12; }; Well just another question to .sqf. In the init.sqf i start the Script with: [] execVM "Markers.sqf"; But on a page i read you have to use "var=execVM "Markers.sqf"; in a trigger i can't use [] execVM "Markers.sqf" only var=execVM "Markers.sqf" works but it look's like in the init.sqf [] execVM "Markers.sqf" works? Can someone explain me that? What does the "var=" do? Share this post Link to post Share on other sites
Big Dawg KS 6 Posted March 1, 2007 SNKMAN you definately need to familiarize yourself with the forEach command. Â <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">for [{true}, {true}, {true}] do { sleep 2; _i = 0; _units = [p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12]; {_i = _i + 1;if(isPlayer _X && alive _X)then{format ["m%1",_i] setMarkerPos (getpos _X);format ["m%1",_i] setMarkerText (name _X)}else{format ["m%1",_i] setMarkerPos [0,0]}} forEach _units; }; Will replace your entire repetative script. Share this post Link to post Share on other sites
snkman 351 Posted March 1, 2007 Damn KyleSarnik That's just... WOW!!! Yeah you right i really have to work around more with all thouse command's. Really Really thank you "AGAIN" very much for this excelent piece of code. You have my respect. Umm... well yes i know my question's suck. But someone can plz tell me, what does the .sqs "#" is replaced with in .sqf? For example i have: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#Loop ~.5 ?isnull (AIORDERS select 0): goto "Loop" #Pass _ai = AIORDERS select 0 _vehicle = AIORDERS select 1 ;Hint format["%1 codebroadcasted", _ai] [_ai] orderGetin false; AIORDERS = [objnull] ?!(_ai in _vehicle): goto "giveOrder" _ai action ["eject", _vehicle]; ~8 _ai AssignAsDriver _vehicle; [_ai] orderGetin true; ~5 #giveOrder _ai doFollow leader group _ai ~.05 Goto "Loop" You see: #Pass, #giveOrder i'm sorry for asking all thouse things but with this way i can learn it much better. Here is what i did so far. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">for [{true}, {true}, {true}] do { sleep .5; if isnull (AIORDERS select 0) than {goto "Loop"}; #Pass _ai = AIORDERS select 0; _vehicle = AIORDERS select 1; [_ai] orderGetin false; AIORDERS = [objnull]; if!(_ai in _vehicle) than {goto "giveOrder"}; _ai action ["eject", _vehicle]; sleep 8; _ai AssignAsDriver _vehicle; [_ai] orderGetin true; sleep 5; #giveOrder _ai doFollow leader group _ai; sleep .05; }; b.t.w. how many sign's was changed from .sqs to .sqf? Share this post Link to post Share on other sites
whisper 0 Posted March 1, 2007 I would use <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">while (true) do {<INSERT CODE>}; instead of this strange for true true true And remove your goto : Your goto structures look like that : if NOT (condition) then goto label X <Code if condition met> label X <additionnal code> in sqf, you don't need that. a simple if (condition) then { <Code if condition met> }; <Additionnal code> does exactly the same thing. If you don't want additionnal code, but a code exclusively if condition is NOT met, then use if... then ... else... Once you get into sqf, you find it better than weird "goto" branches of sqs. Btw that's a strange script you've got there Ordering a guy to eject then go back to vehicle? EDIT : I just reread the Biki, and I am wrong in using while (tru)... I didn't know this while limitation, so you better follow kyleSarnik suggestion, in fact. Share this post Link to post Share on other sites
snkman 351 Posted March 1, 2007 Hi whisper, well this script look's strange becouse it's part of a Revive Respawn. If the KI Soldiers of your Team are in a vehicle and you was killed they will eject of the Vehicle, Revive you and go back to the Vehicle. Well i think i now understand some more of how to get in .sqf I did something but i don't know if it's right Well to me it look's much better then bevore. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">for [{true}, {true}, {true}] do { sleep .5; if (AIORDERS select 0) then{ if ( _ai = AIORDERS select 0 _vehicle = AIORDERS select 1) then { [_ai] orderGetin false; AIORDERS = [objnull]; }; if (_ai in _vehicle) then { _ai doFollow leader group _ai; sleep .05; }; _ai action ["eject", _vehicle]; sleep 8; _ai AssignAsDriver _vehicle; [_ai] orderGetin true; sleep 5; }; Share this post Link to post Share on other sites
Big Dawg KS 6 Posted March 1, 2007 But someone can plz tell me, what does the .sqs "#" is replaced with in .sqf? Nothing, you can't jump around in .sqf scripts, they have to go in order, so you have to redsign your scripts with this kind of structure. Share this post Link to post Share on other sites
kronzky 5 Posted March 1, 2007 BTW - Str has been so nice and to translate the Czech SQS to SQF page. So, it's now available on the Wiki in English: SQS to SQF conversion. Share this post Link to post Share on other sites
snkman 351 Posted March 2, 2007 WoW that's cool! Just 2 day's bevore i found this page too. Thouse examples are very very helpfull! Well i think im shortly bevore my first breakthrough!!!!!!!!! I was trying to convert a nextcam script for the Revive Respawn and now i only get an error message at line 26! <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">// //Script for the spectating script v1.2 by Kegetys <Kegetys@dnainternet.net> //http://www.ofp.kege.cjb.net // _tries = 0; _DeathCamIndex = DeathCamIndex; if (notalive) then { _DeathCamIndex = _DeathCamIndex + _this; }; if (_this == 0) then { DeathCamIndex = _DeathCamIndex; lbSetCurSel [1047002, DeathCamIndex]; _name = name (DeathCamArray select DeathCamIndex); if (_name == "error: no unit") then {_name = ""}; ctrlSetText [116969,_name]; }; if((DeathCamArray select _DeathCamIndex) in list playeralive) then{ DeathCamCurTarget = (DeathCamArray select DeathCamIndex) exit; DeathCamCurTarget = (DeathCamArray select 0); }; if (_DeathCamIndex < 0) then { _DeathCamIndex = (count DeathCamArray)-1; }; if (_DeathCamIndex >= count DeathCamArray) then { _DeathCamIndex = 0; }; if (alive (DeathCamArray select _DeathCamIndex)) AND ((DeathCamArray select _DeathCamIndex) in list playeralive) then { DeathCamIndex = _DeathCamIndex; lbSetCurSel [1047002, DeathCamIndex]; _name = name (DeathCamArray select DeathCamIndex); if (_name == "error: no unit") then {_name = ""}; ctrlSetText [116969,_name]; }; if((DeathCamArray select _DeathCamIndex) in list playeralive) then{ DeathCamCurTarget = (DeathCamArray select DeathCamIndex) exit; DeathCamCurTarget = (DeathCamArray select 0); }; _tries = _tries + 1; //Avoid infinite loop if everyone are dead if _tries < (count DeathCamArray)+1 then { _DeathCamIndex = _DeathCamIndex + _this; }; exit; B.t.w. this is line 26: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if((DeathCamArray select _DeathCamIndex) in list playeralive) then{ I did all that by myself Am i on the right way? Share this post Link to post Share on other sites
Big Dawg KS 6 Posted March 2, 2007 Edit: Here's your problem btw (underlined). Quote[/b] ]DeathCamCurTarget = (DeathCamArray select DeathCamIndex) exit; Btw why do you have two (one local and one global) DeathCamIndex variables? Share this post Link to post Share on other sites
snkman 351 Posted March 2, 2007 Well becouse in the original .sqs Script there was two times goto "alive" so i thought i have to add this two times too... See <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">; ; Script for the spectating script v1.2 by Kegetys <Kegetys@dnainternet.net> ; http://www.ofp.kege.cjb.net ; _tries = 0 _DeathCamIndex = DeathCamIndex #notalive _DeathCamIndex = _DeathCamIndex + _this ? _this == 0 : goto "alive" ? _DeathCamIndex < 0 : _DeathCamIndex = (count DeathCamArray)-1 ? _DeathCamIndex >= count DeathCamArray : _DeathCamIndex = 0 ? (alive (DeathCamArray select _DeathCamIndex)) AND ((DeathCamArray select _DeathCamIndex) in list playeralive): goto "alive" _tries = _tries + 1 ; Avoid infinite loop if everyone are dead ? _tries < (count DeathCamArray)+1 : goto "notalive" exit #alive DeathCamIndex = _DeathCamIndex lbSetCurSel [1047002, DeathCamIndex] _name = name (DeathCamArray select DeathCamIndex) if (_name == "error: no unit") then {_name = ""} ctrlSetText [116969,_name] ?((DeathCamArray select _DeathCamIndex) in list playeralive): DeathCamCurTarget = (DeathCamArray select DeathCamIndex); exit DeathCamCurTarget = (DeathCamArray select 0) Share this post Link to post Share on other sites
snkman 351 Posted March 12, 2007 YEEEEEEEEEEEEEEEEEEEEEESSSSS!!!!! I think i got it!!! <span style='color:red'>I CONVERTET MY FIRST WORKING .SQF SCRIPT!!!</span> Well i tested it and i get no errors and it works fine. But plz can someone check if i really did right everything... CUZ i just can't belive it myself. Okay here is: .sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;------------------------------------------------------------- ;ArmA - REVIVE RESPAWN Initializ Script - By Unknown ;------------------------------------------------------------- ;Revive Spectate Data goes below ;------------------------------------------------------------- Westalive = [] par3 = 20 RescueListTmp = [] RescueList = [p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12] ReviveListTmp = [] ReviveList = ["p1","p2","p3","p4","p5","p6","p7","p8","p9","p10","p11","p12"] ;Below section removes non existing units from the revivelist ;------------------------------------------------------------- _Xn = count ReviveList -1 _nStart = 0 #looplist _unitL = call compile (ReviveList select _nStart) _rescueL = RescueList select _nStart ?(Alive _unitL): ReviveListTmp = ReviveListTmp + [(ReviveList select _nStart)]; ?(Alive _rescueL): RescueListTmp = RescueListTmp + [(RescueList select _nStart)]; ~.01 ?_NStart >= _Xn: goto "Skiplist" _NStart = _NStart + 1 Goto "looplist" #skiplist ReviveList = ReviveListTmp RescueList = RescueListTmp ;titletext[format ["%1", ReviveList], "Plain down"] respawnp1 = 0 respawnp2 = 0 respawnp3 = 0 respawnp4 = 0 respawnp5 = 0 respawnp6 = 0 respawnp7 = 0 respawnp8 = 0 respawnp9 = 0 respawnp10 = 0 respawnp11 = 0 respawnp12 = 0 AIORDERS = [objnull] Deathmap = 1 CustomControl = 5 And here: .SQF <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">//------------------------------------------------------------- //ArmA - REVIVE RESPAWN Initializ Script - By Unknown //------------------------------------------------------------- //Revive Spectate Data goes below //------------------------------------------------------------- Westalive = []; par3 = 20; RescueListTmp = []; RescueList = [p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12]; ReviveListTmp = []; ReviveList = ["p1","p2","p3","p4","p5","p6","p7","p8","p9","p10","p11","p12"]; //Below section removes non existing units from the revivelist //------------------------------------------------------------- _Xn = count ReviveList -1; _nStart = 0; while {looplist} do { _unitL = call compile (ReviveList select _nStart); _rescueL = RescueList select _nStart; if (Alive _unitL) then { ReviveListTmp = ReviveListTmp + [(ReviveList select _nStart)]; if (Alive _rescueL) then { RescueListTmp = RescueListTmp + [(RescueList select _nStart)]; sleep .01; if (_NStart >= _Xn) then { ReviveList = ReviveListTmp; RescueList = RescueListTmp; //titletext[format ["%1", ReviveList], "Plain down"] respawnp1 = 0; respawnp2 = 0; respawnp3 = 0; respawnp4 = 0; respawnp5 = 0; respawnp6 = 0; respawnp7 = 0; respawnp8 = 0; respawnp9 = 0; respawnp10 = 0; respawnp11 = 0; respawnp12 = 0; AIORDERS = [objnull]; Deathmap = 1; CustomControl = 5; }; }; }; _NStart = _NStart + 1; }; Share this post Link to post Share on other sites
snkman 351 Posted March 12, 2007 Damn it it work's just 50%.... But i get no errors and the Revive Respawn Works only the DeadMap did not work... I think it has something to do with: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _Xn = count ReviveList -1; _nStart = 0; and <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _NStart = _NStart + 1; Becouse thouse command's are used in the DeadMap too. PLZ!!!!!! SOMEONE HELP!!!! Share this post Link to post Share on other sites