Login

russian armor

Problem with LUA Table

29 Aug 2015, 07:21 AM
#1
avatar of ernesto-m

Posts: 42

Hi Folks,

need your help in defining a LUA Table.

Script run in Error: "attempt to index field 'GERMAN' (a nil value)"


-- CoH2 Factions, MP Ground Units
_SBP={} <---- think the Problem is here in wrong Table define.



--GERMAN OSTHEER
_SBP.GERMAN.SOLDIERS={
SBP.GERMAN.ASSAULT_GRENADIER_SQUAD_MP,
SBP.GERMAN.GRENADIER_SQUAD_MG42LMG_MP,
SBP.GERMAN.GRENADIER_SQUAD_MP,
SBP.GERMAN.MG42_HEAVY_MACHINE_GUN_SQUAD_MP,
SBP.GERMAN.MORTAR_TEAM_81MM_MP,
SBP.GERMAN.ASSAULT_OFFICER_SQUAD_MP,
SBP.GERMAN.OFFICER_SQUAD_MP,
SBP.GERMAN.OSTRUPPEN_SQUAD_MP,
SBP.GERMAN.OSTRUPPEN_SQUAD_RESERVES_MP,
SBP.GERMAN.PANZER_GRENADIER_SQUAD_MP,
SBP.GERMAN.URBAN_ASSAULT_PANZER_GRENADIER_SQUAD_MP,
SBP.GERMAN.PIONEER_SQUAD_MP,
SBP.GERMAN.SNIPER_SQUAD_MP,
SBP.GERMAN.STORMTROOPER_SQUAD_MP,
SBP.GERMAN.PAK40_75MM_AT_GUN_SQUAD_MP,
SBP.GERMAN.PAK43_88MM_AT_GUN_SQUAD_MP}

_SBP.GERMAN.VEHICLES_LIGHT={
SBP.GERMAN.SCOUTCAR_SDKFZ222_MP,
SBP.GERMAN.MECHANIZED_250_HALFTRACK_GRENADIERS_MP,
SBP.GERMAN.MECHANIZED_250_HALFTRACK_MP,
SBP.GERMAN.MORTAR_250_HALFTRACK_SQUAD_MP,
SBP.GERMAN.SDKFZ_251_HALFTRACK_SQUAD_MP,
SBP.GERMAN.PUMA_EAST_GERMAN_MP,
SBP.GERMAN.PANZERWERFER_SQUAD_MP}

_SBP.GERMAN.VEHICLES_HEAVY={
SBP.GERMAN.BRUMMBAR_SQUAD_MP,
SBP.GERMAN.ELEFANT_TANK_DESTROYER_SQUAD_MP,
SBP.GERMAN.HOWITZER_105MM_LE_FH18_ARTILLERY_MP,
SBP.GERMAN.PANZER_IV_COMMAND_SQUAD_MP,
SBP.GERMAN.OSTWIND_SQUAD_MP,
SBP.GERMAN.STUG_III_E_COMMANDER_SQUAD_MP,
SBP.GERMAN.STUG_III_E_SQUAD_MP,
SBP.GERMAN.STUG_III_SQUAD_MP,
SBP.GERMAN.PANZER_IV_SQUAD_MP,
SBP.GERMAN.PANZER_IV_STUBBY_SQUAD_MP,
SBP.GERMAN.PANTHER_SQUAD_MP,
SBP.GERMAN.TIGER_SQUAD_MP,
SBP.GERMAN.TIGER_ACE_SQUAD_MP}




07:07:15.32 SCAR ERROR Callstack:
Lua test_coh2_units.scar"] Ln 27 (OnInit)
07:07:15.32 GameObj::OnFatalScarError: [[string "DATA:Scenarios\mp\community\test_coh2_units\test_coh2_units.scar"]:27: attempt to index field 'GERMAN' (a nil value)]
07:07:15.32 GAME -- SimulationController::Pause 0



never give up greetings
-ernst-
30 Aug 2015, 04:34 AM
#2
avatar of ernesto-m

Posts: 42

...never give up, trail and error was the "solution" ;o))


-- CoH2 Factions, MP Ground Units
_SBP={
GERMAN={
SOLDIER={},
VEHICLES_LIGHT={},
VEHICLES_HEAVY={}
},
AEF={
SOLDIER={},
VEHICLES_LIGHT={},
VEHICLES_HEAVY={}
},
SOVIET={
SOLDIER={},
VEHICLES_LIGHT={},
VEHICLES_HEAVY={}
},
WEST_GERMAN={
SOLDIER={},
VEHICLES_LIGHT={},
VEHICLES_HEAVY={}
}
}

_ABILITY={
GERMAN={},
AEF={},
SOVIET={},
WEST_GERMAN={}
}

_UPG={
GERMAN={},
AEF={},
SOVIET={},
WEST_GERMAN={}
}

Now Script run whitout Error,.. ;o)


1 user is browsing this thread: 1 guest

Ladders Top 10

  • #
    Steam Alias
    W
    L
    %
    Streak
Data provided by Relic Relic Entertainment

Replay highlight

VS
  • U.S. Forces flag cblanco ★
  • The British Forces flag 보드카 중대
  • Oberkommando West flag VonManteuffel
  • Ostheer flag Heartless Jäger
uploaded by XXxxHeartlessxxXX

Board Info

655 users are online: 655 guests
0 post in the last 24h
0 post in the last week
28 posts in the last month
Registered members: 49426
Welcome our newest member, Uccello
Most online: 2043 users on 29 Oct 2023, 01:04 AM