Jump to content

Recommended Posts

  • ED Team
Posted

I hate to make you post twice, but I am collecting problems to report. So I am looking for the bad mission blocking ones. So be as clear as possible, link any logs, missions (if you could give me a small mission that I can load up and watch crash right away, even better) and scripts. I will report these tonight, so the sooner the better... please :)

 

This thread will be heavily moderated, so no discussion please, just the cold hard bugs please.

64Sig.png
Forum RulesMy YouTube • My Discord - NineLine#0440• **How to Report a Bug**

1146563203_makefg(6).png.82dab0a01be3a361522f3fff75916ba4.png  80141746_makefg(1).png.6fa028f2fe35222644e87c786da1fabb.png  28661714_makefg(2).png.b3816386a8f83b0cceab6cb43ae2477e.png  389390805_makefg(3).png.bca83a238dd2aaf235ea3ce2873b55bc.png  216757889_makefg(4).png.35cb826069cdae5c1a164a94deaff377.png  1359338181_makefg(5).png.e6135dea01fa097e5d841ee5fb3c2dc5.png

Posted

getUnits() does not return correct tables for categories AIRPLANE and HELICOPTER. SHIP and GROUND are working, though.

 

For details: Scripting Engine Bugs

 

But it seems, it is reported now (thanks!): 0026588

 

Fwiw, my minimum script to reproduce the error:

local group = coalition.getGroups(coalition.side.RED,Group.Category.AIRPLANE)
env.info("before getUnits()")
local units = group[1]:getUnits()
env.info("after getUnits()")
env.info("getUnits() returned "..group[1]:getName())

This will write "before getUnits" into the DCS.log, but then produces an runtime error ("unit unknown" or so). It never reaches the point where it would write "after getUnits".

 

Replace AIRPLANE with GROUND and it will run as expected.

 

(ofc make sure, you have at least one red SHIP group and one red AIRPLANE group in your mission :o)

  • ED Team
Posted

Yes, I reported this one, see that thread. Thanks!

 

getUnits() does not return correct tables for categories AIRPLANE and HELICOPTER. SHIP and GROUND are working, though.

 

For details: Scripting Engine Bugs

 

But it seems, it is reported now (thanks!): 0026588

 

Fwiw, my minimum script to reproduce the error:

local group = coalition.getGroups(coalition.side.RED,Group.Category.AIRPLANE)
env.info("before getUnits()")
local units = group[1]:getUnits()
env.info("after getUnits()")
env.info("getUnits() returned "..group[1]:getName())

This will write "before getUnits" into the DCS.log, but then produces an runtime error ("unit unknown" or so). It never reaches the point where it would write "after getUnits".

 

Replace AIRPLANE with GROUND and it will run as expected.

 

(ofc make sure, you have at least one red SHIP group and one red AIRPLANE group in your mission :o)

64Sig.png
Forum RulesMy YouTube • My Discord - NineLine#0440• **How to Report a Bug**

1146563203_makefg(6).png.82dab0a01be3a361522f3fff75916ba4.png  80141746_makefg(1).png.6fa028f2fe35222644e87c786da1fabb.png  28661714_makefg(2).png.b3816386a8f83b0cceab6cb43ae2477e.png  389390805_makefg(3).png.bca83a238dd2aaf235ea3ce2873b55bc.png  216757889_makefg(4).png.35cb826069cdae5c1a164a94deaff377.png  1359338181_makefg(5).png.e6135dea01fa097e5d841ee5fb3c2dc5.png

Posted

I don't want to belabor the point, but just for clarification, did you report both problematic scripting-engine functions?

 

Function 1 coalition.getGroups()

 

Problem: This function (using the listed arguments) does not return a table of valid group references as it should.

 

[font=Courier New]
coalition.getGroups([i] any_side[/i], Groups.Category.AIRPLANE )
coalition.getGroups([/font][font=Courier New][font=Courier New][i] any_side[/i][/font], Groups.Category.HELICOPTER )
coalition.getGroups([/font][font=Courier New][font=Courier New][i] any_side[/i][/font], nil )
[/font]

Function 2 coalition.addGroup()

 

Problem: This function (using the listed arguments) does not return a reference to the newly created group as it should. (It does add the group.)

 


[font=Courier New]-- tested and problem confirmed
coalition.addGroup( [i]any_country_ID,[/i] Group.Category.AIRPLANE[i], any_group_data )

[/i]-- unconfirmed
[/font][font=Courier New]coalition.addGroup( [i]any_country_ID,[/i] Group.Category.HELICOPTER[i], any_group_data )[/i][/font][font=Courier New]
[/font]

Posted

It is trouble in a way, embark\disembark functionality (helicopters)

 

It is not possible or unknown how to trace with a script if a passenger embarked.

Scripticaly the unit seems invisibly frozen on coordinate where it embarked. In other words the embarked unit has al the properties of the unembarked unit.

 

unit ~= nil

Object.isExist(unit) == true

Unit.isActive(unit) == true

unit:getPosition().p == embarkCoordinates

the "invisibility" is not a tracable unit property

 

One small word of the developer, one giant leap for the scripterskind

 

 

 

 

 

.

Posted

Users of the CTTS (Complete Transport Script) have reported problems since 1.2.8. See http://forums.eagle.ru/showthread.php?t=123987 and http://forums.eagle.ru/showthread.php?t=108523&page=21 .

 

In my opinion its problems are the direct result of the scripting-engine bug already reported. If the temporary fix to CTTS is not used the error will propagate and eventually raise errors in Mist. So you may see references to problems with Mist, which may or may not have anything to do with the scripting engine.

 

In fact, it appears Mist has problems unrelated to the scripting engine, which are not ED Development issues. See

http://forums.eagle.ru/showpost.php?p=2066139&postcount=528.

Posted (edited)

I hope I am not to late. :)

 

But I wanted to test it more thoroughly. The eventhandler S_EVENT_PLAYER_ENTER_UNIT only fires for server-player not for client-player. It could be the best eventhandler for making MP scenarios. So it would be nice if it worked for both.

 

-----------example----------------------------------------------

 

JIPevHandler = {}

function JIPevHandler:onEvent(newClient)

 

if newClient.id == world.event.S_EVENT_PLAYER_ENTER_UNIT then

 

trigger.action.outTextForCoalition(coalition.side.BLUE, string.format("###DEBUG### PLAYER_ENTER_UNIT event triggered"), 10)

 

end

 

end

world.addEventHandler(JIPevHandler)

 

-----------------------------------------------------------------

 

 

 

 

 

Thanks,

.

Edited by piXel496
  • ED Team
Posted

I need an attached mission to show an example of this issue or I cant report it, thanks!

 

I hope I am not to late. :)

 

But I wanted to test it more thoroughly. The eventhandler S_EVENT_PLAYER_ENTER_UNIT only fires for server-player not for client-player. It could be the best eventhandler for making MP scenarios. So it would be nice if it worked for both.

 

-----------example----------------------------------------------

 

JIPevHandler = {}

function JIPevHandler:onEvent(newClient)

 

if newClient.id == world.event.S_EVENT_PLAYER_ENTER_UNIT then

 

trigger.action.outTextForCoalition(coalition.side.BLUE, string.format("###DEBUG### PLAYER_ENTER_UNIT event triggered"), 10)

 

end

 

end

 

-----------------------------------------------------------------

 

 

 

 

 

Thanks,

.

64Sig.png
Forum RulesMy YouTube • My Discord - NineLine#0440• **How to Report a Bug**

1146563203_makefg(6).png.82dab0a01be3a361522f3fff75916ba4.png  80141746_makefg(1).png.6fa028f2fe35222644e87c786da1fabb.png  28661714_makefg(2).png.b3816386a8f83b0cceab6cb43ae2477e.png  389390805_makefg(3).png.bca83a238dd2aaf235ea3ce2873b55bc.png  216757889_makefg(4).png.35cb826069cdae5c1a164a94deaff377.png  1359338181_makefg(5).png.e6135dea01fa097e5d841ee5fb3c2dc5.png

Posted
ajax, can you post a mission showing your issue? Just a small example that will show the error within a short period of time?

Will do as soon as I get home from work.

Posted

Mission with test scripts is attached.

 

Note: To test the return value from coalition.addGroup() you must enter the sim on the RED side and spawn an OPFOR group using the F10 radio commands.

 

F10-Other...

-----> F1-OPFOR Menu...

------------> F2-Spawn

There is one group of each category for each side in the mission. (Plus the client aircraft.)

 

Only one RED client aircraft is defined (Ka-50). Another RED airframe can be added if preferred.

 

The included scripts write to the DCS.log file. The following shows the expected output:

 


-- output from coalition.getGroups()

02960.277 INFO    SCRIPTING: Time: 47.401 Side: RED Category: SHIP pcall Success: true
02960.277 INFO    SCRIPTING: Time: 47.401 Side: RED Category: SHIP Groups: 1
02960.277 INFO    SCRIPTING: Time: 47.401 Side: RED Category: SHIP Group[1] = Red AI Ship Rezky has 2 units.
02960.277 INFO    SCRIPTING: Time: 47.401 Side: RED Category: GROUND pcall Success: true
02960.277 INFO    SCRIPTING: Time: 47.401 Side: RED Category: GROUND Groups: 1
02960.277 INFO    SCRIPTING: Time: 47.401 Side: RED Category: GROUND Group[1] = Red AI Ground SA-13 has 4 units.
02960.277 INFO    SCRIPTING: Time: 47.401 Side: RED Category: HELICOPTER pcall Success: true
02960.277 INFO    SCRIPTING: Time: 47.401 Side: RED Category: HELICOPTER Groups: 2
02960.277 INFO    SCRIPTING: Time: 47.401 Side: RED Category: HELICOPTER Bad Group: 1 Group doesn't exist
02960.277 INFO    SCRIPTING: Time: 47.401 Side: RED Category: HELICOPTER Bad Group: 2 Group doesn't exist
02960.277 INFO    SCRIPTING: Time: 47.401 Side: RED Category: AIRPLANE pcall Success: true
02960.277 INFO    SCRIPTING: Time: 47.401 Side: RED Category: AIRPLANE Groups: 1
02960.277 INFO    SCRIPTING: Time: 47.401 Side: RED Category: AIRPLANE Bad Group: 1 Group doesn't exist
02960.277 INFO    SCRIPTING: Time: 47.401 Side: BLUE Category: SHIP pcall Success: true
02960.277 INFO    SCRIPTING: Time: 47.401 Side: BLUE Category: SHIP Groups: 1
02960.277 INFO    SCRIPTING: Time: 47.401 Side: BLUE Category: SHIP Group[1] = Blue AI Ship Normandy has 2 units.
02960.277 INFO    SCRIPTING: Time: 47.401 Side: BLUE Category: GROUND pcall Success: true
02960.277 INFO    SCRIPTING: Time: 47.401 Side: BLUE Category: GROUND Groups: 1
02960.277 INFO    SCRIPTING: Time: 47.401 Side: BLUE Category: GROUND Group[1] = Blue AI Ground Vulcan has 4 units.
02960.277 INFO    SCRIPTING: Time: 47.401 Side: BLUE Category: HELICOPTER pcall Success: true
02960.277 INFO    SCRIPTING: Time: 47.401 Side: BLUE Category: HELICOPTER Groups: 1
02960.277 INFO    SCRIPTING: Time: 47.401 Side: BLUE Category: HELICOPTER Bad Group: 1 Group doesn't exist
02960.277 INFO    SCRIPTING: Time: 47.401 Side: BLUE Category: AIRPLANE pcall Success: true
02960.277 INFO    SCRIPTING: Time: 47.401 Side: BLUE Category: AIRPLANE Groups: 1
02960.277 INFO    SCRIPTING: Time: 47.401 Side: BLUE Category: AIRPLANE Bad Group: 1 Group doesn't exist

-- output from coalition.addGroup()

02961.505 INFO    SCRIPTING: Red Client Helo Ka-50 (aj) spawned OPFOR.
02961.505 INFO    SCRIPTING: coalition.addGroup() return value is invalid

SSE Bug Test Mission.miz

Posted

New Scripting Engine bug to report: Group.getSize()

 

The Group.getSize() function does not do what it's supposed to. It returns the current number of units in a group instead of the initial number of units.

 

Here is the relevant text from the documentation:

number function Group.getSize(Group self)

 

returns initial size of the group. If some of the units will be destroyed, initial size of the group will not be changed. Initial size limits the unitNumber parameter for Group.getUnit() function.

 

array of Unit function Group.getUnits(Group self)

 

returns array of the units present in the group now. Destroyed units will not be enlisted at all.

The attached mission runs a counting script before and after destroying some of the units. As you can see from the log output, getSize() and count of getUnits() return the same thing.

 

[font=Courier New]00466.405 INFO    SCRIPTING: getGroupCount() function loaded.
00469.593 INFO    SCRIPTING: Initial: getSize() returns 16
00469.593 INFO    SCRIPTING: Initial: #units is 16
00480.110 INFO    SCRIPTING: Final: getSize() returns 12
00480.110 INFO    SCRIPTING: Final: #units is 12
[/font]

SSE_getSize_Bug.zip

Posted
New Scripting Engine bug to report: Group.getSize()

 

The Group.getSize() function does not do what it's supposed to. It returns the current number of units in a group instead of the initial number of units.

 

Group.getInitialSize() was added with 1.2.6, which performs this function. Group.getSize() is supposed to return the groups current size.

 

 

The hoggit wiki page on the scripting engine is pretty much the defacto scripting documentation due to the problems ED's wiki has had with spam. The ED wiki was locked down from new posts, and appears to be gone now. Unfortunately it was the only place the developer had updated stuff into on what was changed in the scripting engine, which in turn I had used to add stuff to the hoggit wiki.

 

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

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

2 issues I've encountered, already reported on another forum thread but I'll add here -

 

Scenario 1 -

1. Su-25T (client/player) launchs Kh-58 at a hawk radar site.

2. Before kh-58 missile hits the hawk radar site, exit the su-25t plane (Either by crashing/ejecting/back to observer).

3. When the missile hits and the unit is destroyed there's no message that the client/player destroyed it or that it has been destroyed at all.

 

*When exporting the events, a hit event is categorized but there's no info on the initiator (nil), only the target.

**There is also no message in the game itself when the unit is destroyed.

 

Scenario 2 -

I've found another issue, AFAIK, the event.(initiator/target/weapon).id_ should be unique. In my export results - https://copy.com/idJOkRkJYbdR

I've found 2 different clients getting the same event.initiator.id_ , can be seen by filtering Initiator ID - 16779784, in the file I gave here.

Should that happen? is there a different unique identifier?

Posted

I have a problem now.....with the Do Script function...when I copy/paste a script in the text box, it seems to take it all....but then if I exit the trigger page and re-enter it...only like 162 of the 2000+ lines of script are saved.....I keep getting an error "unexpected symbol near line 162"...and I'm like WFT....but then looking into it...there is no problem with the script...it that its not saving the whole thing....it ends at 162.....Do I have to just use the Do Script File instead of Do Script....

It only takes two things to fly, Airspeed and Money.

Posted
I have a problem now.....with the Do Script function...when I copy/paste a script in the text box, it seems to take it all....but then if I exit the trigger page and re-enter it...only like 162 of the 2000+ lines of script are saved.....I keep getting an error "unexpected symbol near line 162"...and I'm like WFT....but then looking into it...there is no problem with the script...it that its not saving the whole thing....it ends at 162.....Do I have to just use the Do Script File instead of Do Script....

 

 

Have the same problem....peculiar!

Midnite Signature.jpg

  • Recently Browsing   0 members

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