Jump to content

Recommended Posts

Posted (edited)

All,

 

I am looking for some guidance to solve this issue in my mission. What does this error ( "Error in error handling" ) actually mean, and if possible, can someone dumb it down. I do not know LUA and trying my best to learn.

 

Sorry. I failed to mention that I am using Slmod and Mist

Edited by Xillinx

[sIGPIC][/sIGPIC]

 

http://1stcavdiv.conceptbb.com/

  • 1 month later...
Posted

I'm getting the same error when I run this:

 

mist.flagFunc.units_in_polygon{
units = {'[blue][plane]'},
zone = mist.getGroupPoints('ZONE OUTSIDE TROOP'),
flag = 20,
toggle = true,
maxalt = 448
}

 

Can anyone shed some light on this?

Posted (edited)

I can't help but I've found this page to be of some benefit in the past... well, pages from this source.

 

http://wiki.hoggit.us/view/Units_in_polygon

 

Looks the same to me- your "ZONE OUTSIDE TROOP" I assume is actually all caps in the mission editor?

 

Sorry I'm a noob to scripting.

 

Other things that have caused me issue- is there a unit in the zone right at mission start? Are you running the script in a "time more" condition? max altitude in the area of the polygon is also valid? (It's not subterranean or something since 448 is above sea level)

 

Also- you running the latest version of MIST? I know that function existed since nearly the beginning... but perhaps it has had to be updated.

 

I'm going to assume also that you have MIST loaded into the mission start?

Edited by ENO

"ENO"

Type in anger and you will make the greatest post you will ever regret.

 

"Sweetest's" Military Aviation Art

Posted

Thanks for the link Eno...I'm an uber-noob so everything helps.

 

I'm running it in a time more condition but it's loading 8 seconds after MIST itself is loaded so I don't think that's a problem. Or is it?

 

I'm good on all your other suggestions above. I thought maybe the altitude was just shy of what it needed to be so I cranked it up to 6000m and I get the same error.

 

 

I'm trying to detect when a client lands in a certain part of the runway...outlined by the waypoints of ZONE OUTSIDE TROOP.

Posted (edited)

Are you just looking for a landing script? I have another I might suggest that I use- I think it's from St3v3. You can include a "group in zone" condition if needed.

 

To answer your question, yes the 8 is VERY likely just fine... so I'd be looking at other issues.

 

What also may be contributing is subtle changes to the scripting engine that have resulted in necessary changes to mist ETC. I recommend you have the latest 3.2 installed and keep an eye open for updates.

 

Hmmm... and if you're trying to identify waypoints with the zone you named- I'm not sure if you're applying the script properly... or you are and I've got the complete wrong idea as to how to determine the zone shapes...

Edited by ENO

"ENO"

Type in anger and you will make the greatest post you will ever regret.

 

"Sweetest's" Military Aviation Art

Posted

I'll just paste it here. Basically needs to be loaded in a "switched condition" style trigger. Then choose condition as "lua predicate" alongside the desired zone... then choose your action.

 

local group = 'geo sup1' --Enter the groupname from the ME here

group = Group.getByName(group)

if group ~= nil then

group = group:getUnits()[1]

if group:inAir() then

return false

else

return true

end

else --If Group does not exist

return true

end

return false

"ENO"

Type in anger and you will make the greatest post you will ever regret.

 

"Sweetest's" Military Aviation Art

Posted

Thanks for the script eno...and whoever wrote it.

 

It's not going to totally solve my problem though. I'm making a training mission where a 500x150ft landing zone is marked and when you touch down in the zone you get a message (or if you miss you get another). So I could put down a bunch of trigger zones, but I really need the rectangle shape I can get from point.in.polygon...

 

Only problem...i don't know how to script! lol. Per the MIST guide:

 

Examples:
mist.flagFunc.units_in_polygon{
units = {'[blue][vehicle]'},
zone = mist.getGroupPoints('forest1'),
flag = 11
}
--[[Once run, this function will start a process that will set flag 11
true when any blue vehicles are within the polygon shape created by the
waypoints of the group named "forest1"]]
mist.flagFunc.units_in_polygon{
units = {'[red][plane]'},
zone = {
[1] = mist.DBs.unitsByName['AO 1'].point,
[2] = mist.DBs.unitsByName['AO 2'].point,
[3] = mist.DBs.unitsByName['AO 3'].point,
[4] = mist.DBs.unitsByName['AO 4'].point,
[5] = mist.DBs.unitsByName['AO 5'].point,
[6] = mist.DBs.unitsByName['AO 6'].point,
},
flag = 201,
maxalt = 6000,
interval = 30
}
--[[Once run, this function will start a process that will set flag 201
true when any red planes are within the polygon shape derived by the
intial starting positions of the units named "AO 1" through "AO 6" and
are less than 6000 meters above sea level. This process will run once
every 30 seconds.]

 

Not sure why it isn't working...using MIST3.2 SLMOD7.1

 

I'm gonna use that landing script though, definitely makes it a lot easier then messing with unit altitudes and such for landing detection. :beer:

Posted

Can you post a mission file that creates the "Error in Error Handling" error? I've yet to see that occur.

 

I copy pasted your first example and got it to work without problems. Admittedly I did change the group name checked by the zone to 'test' to match the group I had created.

 

 

There does look to be an error with the toggle feature, which I am working to address.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

I've had that error a lot in this new mission I'm building but typically it's a result of some subtle error I've made. The only issue is it doesn't tell me where it is- as you can imagine the result is I get very good at learning the triggers.

 

You helped me out with one of my previous errors involving the same script grimes- but ill make a note of forwarding you the logs next time I stumble into it.

"ENO"

Type in anger and you will make the greatest post you will ever regret.

 

"Sweetest's" Military Aviation Art

Posted
Can you post a mission file that creates the "Error in Error Handling" error? I've yet to see that occur.

 

I copy pasted your first example and got it to work without problems. Admittedly I did change the group name checked by the zone to 'test' to match the group I had created.

 

 

There does look to be an error with the toggle feature, which I am working to address.

 

Here ya go.

Training Server TEST.miz

Posted

The problem was the spelling. "ZONE TROOP " was the group name you had used. Note the space at the end. Therefore the function couldn't find the group. Remove the space at the end and it will work.

 

 

The error in error handling issue is a little more distressing. When I ran the mission I got a proper error log showing precisely which line was the problem along with some other details. So I don't really know whats causing it. Files should be the same from game to game and unless there is something in saved games that dictates how it works, the error should appear correctly.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

Ah...great to know that after hours of banging my head against a keyboard I had missed the spelling... So I guess my next question is, for general troubleshooting or if I get an error like this again where do I look for clues?

 

I don't see anything in any of the logs.

 

Thanks for looking at it ~

Posted

It happens to the best of us, I've been hung up numerous times because of the correct spelling but incorrect usage of letter casing.

 

Usually errors show up in DCS.log but I'm not sure why its working for me, but not for you. I've tried a few things to try and reproduce it but so far nothing. My only thoughts toward fixing it on your end is to re-download the mission editor/scripts files and maybe delete the contents of the Mission Editor folder in savedgames.

 

Are you running any mods?

 

What it normally looks like is this:

00135.220 ERROR   DCS: Mission script error: : [string "C:\Users\jeff\AppData\Local\Temp\DCS\/~mis0..."]:2358: Error in function mist.flagFunc.units_in_polygon, parameter "zone/polyzone", expected: table, got nil
stack traceback:
[C]: ?
[C]: in function 'assert'
[string "C:\Users\jeff\AppData\Local\Temp\DCS\/~mis0..."]:2358: in function 'units_in_polygon'
[string "mist.flagFunc.units_in_polygon(..."]:1: in main chunk

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

No mods at the moment. Just have some custom skins from my group.

 

Mods that are in JGSME (but not active atm) since my clean install (1.2.6 v2) are:

MI-8 English cockpit

KA-50 JTAC

DTAC Terrain

 

I'll give your suggestions a go when I get some time and will report back if it makes them log properly. Cheers

Posted

It appears to be caused by slmod for some reason or another. Simply remove slmod when debugging missions with scripting in it and the correct errors will appear. I'll try to figure out why slmod is causing it.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...