Home   Help Search Login Register  

Author Topic: Advanced but Simple Death match help  (Read 6349 times)

0 Members and 1 Guest are viewing this topic.

Offline ArMaTeC

  • Members
  • *
  • City Life 2
    • armatechsquad.com
Re: Advanced but Simple Death match help
« Reply #15 on: 09 Jun 2007, 23:06:37 »
im getting a Null-Object error in the mission on the first post could soem one take a look at it for me please i wanna have this out and ready for 1.08 on monday

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Advanced but Simple Death match help
« Reply #16 on: 09 Jun 2007, 23:53:48 »
Check your mission, but definitively too many scripts here and there, you need at least to catch the script where your null object is causing problems.

Offline ArMaTeC

  • Members
  • *
  • City Life 2
    • armatechsquad.com
Re: Advanced but Simple Death match help
« Reply #17 on: 11 Jun 2007, 12:37:34 »
ok i think i found the script with the error in it can soem one take a look at it for me and see if u can work out why the <object-null> error pops up in mp but not in SP

Code: [Select]
// Gunship Deathmatch
// By ArMaTeC
//
// Usage: score board system killed
// Edited: 08.06.07 17:40
_GTBody = format [("Game Time: ") + "%1", [ceil(time)] call convertTimeFunctions];
if(ArmA_debug)then{player globalChat format["DEBUG: playerkilled.sqs Started",_GTBody];};
_victim = _this select 0;
_killer = _this select 1;

_victim removeEventHandler ["killed", tx_kill];
_victim removeEventHandler ["dammaged", tx_dammage];
_message ="";
_name_killer ="error";
_name_victim ="error";

if((!isNull _killer) or (not alive _killer))then {_name_killer = name _killer;};
if((!isNull _victim) or (not alive _victim))then {_name_victim = name _victim;};
_name_victim =

if(_killer == _victim) then {_message = format [localize "STR_ISDE",_name_killer];};
if(_killer != _victim) then {_message = format [localize "STR_KILL",_name_killer, _name_victim];};
messagewwdd = formaT [localize "STR_NFLASH",_message];
[1,messagewwdd] call six_fTxRadio;
if(ArmA_debug)then{player globalChat format["DEBUG:playerkilled.sqs news flash message %1 %2",messagewwdd,_GTBody];};
_kils = format ["arma_%1score",_killer];
_kils1 = format ["arma_%1death",_victim];
if(ArmA_debug)then{player globalChat format["DEBUG:playerkilled.sqs killer %1 - killed%2 %3",_kils,_kils1,_GTBody];};
if(_killer == s1)then {arma_s1score = arma_s1score + 1; Publicvariable _kils;};
if(_victim == s1)then {arma_s1death = arma_s1death + 1; Publicvariable _kils1;};
if(_killer == s1)then {arma_s1score = arma_s1score + 1; Publicvariable _kils;};
if(_victim == s1)then {arma_s1death = arma_s1death + 1; Publicvariable _kils1;};
if(_killer == s2)then {arma_s2score = arma_s2score + 1; Publicvariable _kils;};
if(_victim == s2)then {arma_s2death = arma_s2death + 1; Publicvariable _kils1;};
if(_killer == s3)then {arma_s3score = arma_s3score + 1; Publicvariable _kils;};
if(_victim == s3)then {arma_s3death = arma_s3death + 1; Publicvariable _kils1;};
if(_killer == s4)then {arma_s4score = arma_s4score + 1; Publicvariable _kils;};
if(_victim == s4)then {arma_s4death = arma_s4death + 1; Publicvariable _kils1;};
if(_killer == s5)then {arma_s5score = arma_s5score + 1; Publicvariable _kils;};
if(_victim == s5)then {arma_s5death = arma_s5death + 1; Publicvariable _kils1;};
if(_killer == s6)then {arma_s6score = arma_s6score + 1; Publicvariable _kils;};
if(_victim == s6)then {arma_s6death = arma_s6death + 1; Publicvariable _kils1;};
if(_killer == s7)then {arma_s7score = arma_s7score + 1; Publicvariable _kils;};
if(_victim == s7)then {arma_s7death = arma_s7death + 1; Publicvariable _kils1;};
if(_killer == s8)then {arma_s8score = arma_s8score + 1; Publicvariable _kils;};
if(_victim == s8)then {arma_s8death = arma_s8death + 1; Publicvariable _kils1;};
if(_killer == s9)then {arma_s9score = arma_s9score + 1; Publicvariable _kils;};
if(_victim == s9)then {arma_s9death = arma_s9death + 1; Publicvariable _kils1;};
if(_killer == s10)then {arma_s10score = arma_s10score + 1; Publicvariable _kils;};
if(_victim == s10)then {arma_s10death = arma_s10death + 1; Publicvariable _kils1;};
if(_killer == s11)then {arma_s11score = arma_s11score + 1; Publicvariable _kils;};
if(_victim == s11)then {arma_s11death = arma_s11death + 1; Publicvariable _kils1;};
if(_killer == s12)then {arma_s12score = arma_s12score + 1; Publicvariable _kils;};
if(_victim == s12)then {arma_s12death = arma_s12death + 1; Publicvariable _kils1;};
if(_killer == s13)then {arma_s13score = arma_s13score + 1; Publicvariable _kils;};
if(_victim == s13)then {arma_s13death = arma_s13death + 1; Publicvariable _kils1;};
if(_killer == s14)then {arma_s14score = arma_s14score + 1; Publicvariable _kils;};
if(_victim == s14)then {arma_s14death = arma_s14death + 1; Publicvariable _kils1;};
if(_killer == s15)then {arma_s15score = arma_s15score + 1; Publicvariable _kils;};
if(_victim == s15)then {arma_s15death = arma_s15death + 1; Publicvariable _kils1;};
if(_killer == s16)then {arma_s16score = arma_s16score + 1; Publicvariable _kils;};
if(_victim == s16)then {arma_s16death = arma_s16death + 1; Publicvariable _kils1;};
if(_killer == s17)then {arma_s17score = arma_s17score + 1; Publicvariable _kils;};
if(_victim == s17)then {arma_s17death = arma_s17death + 1; Publicvariable _kils1;};
if(_killer == s18)then {arma_s18score = arma_s18score + 1; Publicvariable _kils;};
if(_victim == s18)then {arma_s18death = arma_s18death + 1; Publicvariable _kils1;};
if(_killer == s19)then {arma_s19score = arma_s19score + 1; Publicvariable _kils;};
if(_victim == s19)then {arma_s19death = arma_s19death + 1; Publicvariable _kils1;};
if(_killer == s20)then {arma_s20score = arma_s20score + 1; Publicvariable _kils;};
if(_victim == s20)then {arma_s20death = arma_s20death + 1; Publicvariable _kils1;};
if(_killer == s21)then {arma_s21score = arma_s21score + 1; Publicvariable _kils;};
if(_victim == s21)then {arma_s21death = arma_s21death + 1; Publicvariable _kils1;};
if(_killer == s22)then {arma_s22score = arma_s22score + 1; Publicvariable _kils;};
if(_victim == s22)then {arma_s22death = arma_s22death + 1; Publicvariable _kils1;};
if(_killer == s23)then {arma_s23score = arma_s23score + 1; Publicvariable _kils;};
if(_victim == s23)then {arma_s23death = arma_s23death + 1; Publicvariable _kils1;};
if(_killer == s24)then {arma_s24score = arma_s24score + 1; Publicvariable _kils;};
if(_victim == s24)then {arma_s24death = arma_s24death + 1; Publicvariable _kils1;};
if(_killer == s25)then {arma_s25score = arma_s25score + 1; Publicvariable _kils;};
if(_victim == s25)then {arma_s25death = arma_s25death + 1; Publicvariable _kils1;};
if(_killer == s26)then {arma_s26score = arma_s26score + 1; Publicvariable _kils;};
if(_victim == s26)then {arma_s26death = arma_s26death + 1; Publicvariable _kils1;};
if(_killer == s27)then {arma_s27score = arma_s27score + 1; Publicvariable _kils;};
if(_victim == s27)then {arma_s27death = arma_s27death + 1; Publicvariable _kils1;};
if(_killer == s28)then {arma_s28score = arma_s28score + 1; Publicvariable _kils;};
if(_victim == s28)then {arma_s28death = arma_s28death + 1; Publicvariable _kils1;};

//call compile format ["arma_%1score",_killer] = (call compile format ["arma_%1score",_killer]) + 1;
//call compile format ["arma_%1death",_victim] = (call compile format ["arma_%1death",_victim]) + 1;
//{publicVariable _x;} forEach ["_kils","_kils1"];
if(ArmA_debug)then{player globalChat format["DEBUG: playerkilled.sqs Compleated",_GTBody];};

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: Advanced but Simple Death match help
« Reply #18 on: 12 Jun 2007, 19:18:53 »
What is this line for? Looks like a typo:
Code: [Select]
_name_victim =
« Last Edit: 12 Jun 2007, 19:51:50 by Mr.Peanut »
urp!

Offline ArMaTeC

  • Members
  • *
  • City Life 2
    • armatechsquad.com
Re: Advanced but Simple Death match help
« Reply #19 on: 12 Jun 2007, 19:24:35 »
T_D helped me and produced this
Code: [Select]
// Gunship Deathmatch
// By ArMaTeC
//
// Usage: score board system killed
// Edited: 08.06.07 17:40 by ArMaTeC
// Edited: 11.06.07 17:40 by T_D

_GTBody = format [("Game Time: ") + "%1", [ceil(time)] call convertTimeFunctions];
if(ArmA_debug)then{player globalChat format["DEBUG: playerkilled.sqs Started",_GTBody];};
_victim = _this select 0;
_killer = _this select 1;
_victim removeEventHandler ["killed", tx_killed];
_victim removeEventHandler ["dammaged", tx_dammage];
_message ="";
_i ="";
_name_killer = if((isNull _killer))then {"Not found"}else{name _killer};
_name_victim = if((isNull _victim))then {"Not found"}else{name _victim};

if(_killer == _victim) then { _message = format [localize "STR_ISDE",_name_killer];};
if(_killer != _victim) then { _message = format [localize "STR_KILL",_name_killer, _name_victim];};
messagewwdd = formaT [localize "STR_NFLASH",_message];
[1,messagewwdd] call six_fTxRadio;

_updateScore =
{
private "_varName";
_varName = "arma_s"+str(_this)+"score";
call compile (_varName + " = " + _varName + "+1");
publicVariable _varName;
};

_updateDeath =
{
private "_varName";
_varName = "arma_s"+str(_this)+"death";
call compile (_varName + " = " + _varName + "+1");
publicVariable _varName;
};

for "_i" from 1 to 28 do
{
_nmbr = str(_i);
call compile("if(_killer == s" + _nmbr + ")then{" + _nmbr + " call _updateScore}");
call compile("if(_victim == s" + _nmbr + ")then{" + _nmbr + " call _updateDeath}");
};
_pos = GetPos _victim;
_tempObj=["SmokeShellRed",_pos] call six_fCreateVehicle;
sleep 5;
deletevehicle _tempObj;

the problem im havign now is with this script as it returns bool array error. Its to replace
Code: [Select]
_w1="No Unit Found";
_w2="No Unit Found";
_w3="No Unit Found";
_w4="No Unit Found";

Code: [Select]
for "_i" from 1 to 28 do
{
_nmbr = str(_i);
call compile("_w" + _nmbr + " = ""No Unit Found"";");

};
hint format["W1 = %1",_w1];

for "_i" from 1 to 28 do
{
_nmbr = str(_i);
call compile("if(alive s" + _nmbr + ")then{_w" + _nmbr + " = format ["%1 : K=%2 D=%3",name s" + _nmbr + ",arma_s" + _nmbr + "score,arma_s" + _nmbr + "death];};");
};

_GDBody = format [("Game Date: ") + "%1",date];
_separator1 = parseText "<br><br />------------------------<br><br />";
_image = "Images\ArmAtec.paa";
_txt = composeText [image _image,"Gunship Leaderboard",image _image,_separator1,parseText _GTBody,_separator1,parseText _GDBody,_separator1,"==========================",_separator1,image _image,parseText _w1,_separator1,image _image,parseText _w2,_separator1,image _image,parseText _w3,_separator1,image _image,parseText _w4,_separator1,image _image,parseText _w5,_separator1,image _image,parseText _w6,_separator1,image _image,parseText _w7,_separator1,image _image,parseText _w8,_separator1,image _image,parseText _w9,_separator1,image _image,parseText _w10,_separator1,image _image,parseText _w11,_separator1,image _image,parseText _w12,_separator1,image _image,parseText _w13,_separator1,image _image,parseText _w14,_separator1,image _image,parseText _w15,_separator1,image _image,parseText _w16,_separator1,image _image,parseText _w17,_separator1,image _image,parseText _w18,_separator1,image _image,parseText _w19,_separator1,image _image,parseText _w20,_separator1,image _image,parseText _w21,_separator1,image _image,parseText _w22,_separator1,image _image,parseText _w23,_separator1,image _image,parseText _w24,_separator1,image _image,parseText _w25,_separator1,image _image,parseText _w26,_separator1,image _image,parseText _w27,_separator1,image _image,parseText _w28];
hint _txt;
playsound "CMBeep";
« Last Edit: 12 Jun 2007, 19:26:09 by ArMaTeC »

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: Advanced but Simple Death match help
« Reply #20 on: 13 Jun 2007, 03:25:35 »
What line generates the error?
urp!

Offline ArMaTeC

  • Members
  • *
  • City Life 2
    • armatechsquad.com
Re: Advanced but Simple Death match help
« Reply #21 on: 13 Jun 2007, 03:28:17 »
Code: [Select]
hint format["W1 = %1",_w1];
and then CTD

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: Advanced but Simple Death match help
« Reply #22 on: 13 Jun 2007, 15:28:15 »
Does it display the hint before you CTD? If it all happens too fast add sleep 1; just after that hint line. We need to know whether the loop below is what is causing the crash.


edit: change
Code: [Select]
call compile("if(alive s" + _nmbr + ")then{_w" + _nmbr + " = format ["%1 : K=%2 D=%3",name s" + _nmbr + ",arma_s" + _nmbr + "score,arma_s" + _nmbr + "death];};");to
Code: [Select]
call compile("if(alive s" + _nmbr + ")then{_w" + _nmbr + " = format [""%1 : K=%2 D=%3"",name s" + _nmbr + ",arma_s" + _nmbr + "score,arma_s" + _nmbr + "death];};");
« Last Edit: 13 Jun 2007, 15:37:50 by Mr.Peanut »
urp!

Offline ArMaTeC

  • Members
  • *
  • City Life 2
    • armatechsquad.com
Re: Advanced but Simple Death match help
« Reply #23 on: 13 Jun 2007, 15:31:08 »
bool error scool array error

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: Advanced but Simple Death match help
« Reply #24 on: 13 Jun 2007, 15:38:48 »
I just made an edit to my post above while you were posting your reply.
« Last Edit: 13 Jun 2007, 15:41:10 by Mr.Peanut »
urp!

Offline ArMaTeC

  • Members
  • *
  • City Life 2
    • armatechsquad.com
Re: Advanced but Simple Death match help
« Reply #25 on: 16 Jun 2007, 09:54:36 »
thank you that worked sweet