LeahTheUnknown Posted May 30, 2018 Share Posted May 30, 2018 (edited) Scriptname _gkx_spawngrenadescript extends objectreference Group Messages Message Property MainMenu Auto Message Property Animals Auto Message Property Robots Auto Message Property Enemies Auto Message Property Monsters Auto Message Property Gangs Auto Message Property CountMenu Auto EndGroup Group Foes LeveledActor[] Property AnimalArray Auto LeveledActor[] Property RobotArray Auto LeveledActor[] Property EnemyArray Auto LeveledActor[] Property MonsterArray Auto LeveledActor[] Property GangArray Auto Int[] Property CountArray Auto EndGroup Struct FoeChoice LeveledActor Foe Int NumFoe EndStruct FoeChoice Temp1 FoeChoice Final Int MainChoice Bool Hold = False FoeChoice Function SubMenu(Message MenuMsg, Message NumMsg, LeveledActor[] FoeArray, Int[] FoeCount) FoeChoice SpawnMe Int FoeIndex = MenuMsg.Show() SpawnMe.Foe = FoeArray[FoeIndex] Int NumChoice = NumMsg.Show() SpawnMe.NumFoe = FoeCount[NumChoice] Hold = False Return SpawnMe EndFunction Event OnInit() debug.notification("Marker placed.") Hold = True MainChoice = MainMenu.Show() If MainChoice == 0 Temp1 = SubMenu(Animals, CountMenu, AnimalArray, CountArray) ElseIf MainChoice == 1 Temp1 = SubMenu(Robots, CountMenu, RobotArray, CountArray) ElseIf MainChoice == 2 Temp1 = SubMenu(Enemies, CountMenu, EnemyArray, CountArray) ElseIf MainChoice == 3 Temp1 = SubMenu(Monsters, CountMenu, MonsterArray, CountArray) ElseIf MainChoice == 4 Temp1 = SubMenu(Gangs, CountMenu, GangArray, CountArray) Else Return EndIf Final = Temp1 While Hold == True Utility.Wait(0.5) EndWhile debug.notification("Placing [" + Final.NumFoe + "] enemies.") PlaceAtMe(Final.Foe, Final.NumFoe) Utility.Wait(2.0) Delete() EndEventUsing this script, I get: [ Marker Placed. ][ Placing 0 Enemies ] and no spawns. Here's my properties Any ideas?Thanks in advance,~GKX Edited May 30, 2018 by GenghisKhanX Link to comment Share on other sites More sharing options...
SKKmods Posted May 30, 2018 Share Posted May 30, 2018 Its a Struct syntax error that is not picked up by the compiler: FoeChoice Temp1 = New FoeChoice FoeChoice Final = New FoeChoice FoeChoice SpawnMe = New FoeChoice Link to comment Share on other sites More sharing options...
akiras404 Posted May 30, 2018 Share Posted May 30, 2018 Probably you needFoeChoice SpawnMe = new FoeChoice Link to comment Share on other sites More sharing options...
LeahTheUnknown Posted May 30, 2018 Author Share Posted May 30, 2018 Thanks guys! Works perfectly now. ~GKX Link to comment Share on other sites More sharing options...
Recommended Posts