JoSchaap / GoT_Wasteland_V2.Stratis

WARNING! This repo is no longer updated, find the updated version on the A3Wasteland git! -
http://www.a3wasteland.com
11 stars 20 forks source link

v2.3 discussion - please use this for discussion #85

Closed JoSchaap closed 10 years ago

JoSchaap commented 10 years ago

* Discusscion thread *

please only discuss here and use the new issue button to report bugs with a full discription and steps to reproduce them

First things first, thanks all for testing, sadly something came up (family thing) so i wasn't able to get any work done yesterday. What i did find out is that there's more things to fix than i initially thought last night..

The list of issues to fix is below:

[Fixed] - general store broken

[Fixed] - briefing missing some line breaks

[Fixed] - increase radius of dead player cleanup (items tend to roll away)

[WontChange-isOK] - The 'you have died from starvation/hunger' hints stay on for too long (decrease its duration)

[Fixed] - investigate an issue where players are randomly spawned mid air in limbo when clicking random (findsafepos failing again?)

[Fixed/WorksAsIntended] - investigate iniDB counter in diag_log 'x objects saved' gets stuck and only increases , should be set to 0 after saving

[Fixed] - investigate server cleanup counter in diag_log '9 dead players 34 AI and 30 clutterred items from the dead have been cleaned up' the numbers are no longer re-setting to 0

[Fixed] - revert to the old vehicle.sqf to see if it fixes the newly added logspam

        Error in expression <F_LOG_remorque", objNull];
        if (!isNull _towedUnit) then
        {
        detach _towedUnit;
        _t>
        20:30:36   Error position: <_towedUnit) then
        {
        detach _towedUnit;
        _t>
        Error Undefined variable in expression: _towedunit
        mpmissions\__cur_mp.Stratis\server\functions\vehicle.sqf, line 139

[Fixed] - A new findsafepos issue has introduced itself?, I thought i got rid of this..

        Error in expression <n
        {
        if (!((count (_testPos isFlatEmpty [_objDist, 0, _maxGradient, _objDist max >
        Error position: <_objDist, 0, _maxGradient, _objDist max >
        Error Undefined variable in expression: _objdist
        File A3\functions_f\misc\fn_findSafePos.sqf, line 100
        Error in expression <};
        };
        _pos = [_markerPos, 2, 45, ( if (_type == 1) then { 2 } else { 5 } ), 0, >
        Error position: <_type == 1) then { 2 } else { 5 } ), 0, >
        Error Undefined variable in expression: _type
        File mpmissions\__cur_mp.Stratis\server\spawning\vehicleCreation.sqf, line 30
        Error in expression <n
        {
        if (!((count (_testPos isFlatEmpty [_objDist, 0, _maxGradient, _objDist max >
        Error position: <_objDist, 0, _maxGradient, _objDist max >
        Error Undefined variable in expression: _objdist
        File A3\functions_f\misc\fn_findSafePos.sqf, line 100

[Fixed] - various new undefined variable spam in rpt (not sure why bis changed this..)

        Cannot create non-ai vehicle ,
        Error in expression <50);
        _car setDamage (random 0.50);
        if (_type in [0,1]) then
        {
        _car setHit ["whe>
        Error position: <_type in [0,1]) then
        {
        _car setHit ["whe>
        Error Undefined variable in expression: _type
        File mpmissions\__cur_mp.Stratis\server\spawning\vehicleCreation.sqf, line 44

        Error in expression <ion Failed: %1",_missionType];
        } else {
        _vehicle setVehicleLock "UNLOCKED";
        _veh>
        Error position: <_vehicle setVehicleLock "UNLOCKED";
        _veh>
        Error Undefined variable in expression: _vehicle
        File mpmissions\__cur_mp.Stratis\server\missions\mainMissions\mission_Convoy.sqf, line 137

[Fixed] - Main mission: coastal patrol, remove the SDV it keeps getting beached by the AI \ investigate why AI tends to beach the boat when engaging players

[Fixed] - extend the time between loot re-spawns and increase precision

[Fixed] - missions no longer delete blown up vehicles..

        Error in expression <%1",_missionType];
        } else {
        if ((damage _vehicle) == 1) then {
        deleteVehicle _ve>
        Error position: <_vehicle) == 1) then {
        deleteVehicle _ve>
        Error Undefined variable in expression: _vehicle
        File mpmissions\__cur_mp.Stratis\server\missions\mainMissions\mission_Coastal_Convoy.sqf, line 180

[Fixed] - Clientsided errorspam when in a group and looking at a group member (screen shots below) [Fixed] - clientsided errorspam when in bluefor/opfor and looking at a group member (screen shots below)

[Fixed] - check if bis_fnc_rsclayer or fn_dynamictext has been changed (sometimes causes an error)

[Fixed] - client sided error message when picking up money while to far away from it (screenshot below)

[Should-be-Fixed(TEST!)] - newplayericons ocasionally still drops a clientsided blackbox error about an undefined hud_icon (see jackiechan image below)

[Fixed] - old undefined variable error is back when you stop spectating a player (probably overwritten my own fixes)

2013-07-26_00010 2013-07-26_00011 2013-07-25_00004 2013-07-26_00008 2013-07-26_00012 2013-07-26_00009 2013-07-26_00013 2013-07-26_00018 2013-07-26_00014 2013-07-26_00019 2013-07-26_00020 2013-07-27_00004 jackie-chan-meme

SCETheFuzz commented 10 years ago

Let me know when you need test guys again. I'm off to bed for about 5 hours of sleep

s3kShUn61 commented 10 years ago

Oh one little thing would be Katiba ammo added to the gunstore. It currently is not available.

s3kShUn61 commented 10 years ago

So any eta on release? Im losing a lot of clients to these error messages and a release would be greatly appreciated even if it has a few left. Any chance 2.3testing could be merged with the main for a .zip dl? Then fixes over the next week or so?

JoSchaap commented 10 years ago

I'm not giving an ETA before i find out what causes the wierd errorboxes without any error being present. ive broken over 3 deadlines allready :)

tonight ill be continuing the hunt for these issues :)

MercyfulFate commented 10 years ago

does this mean that the issues you had with my inventory system might not be from the system itself?

s3kShUn61 commented 10 years ago

What is wrong with the errorboxes? I dont know what you saw about it but from what Ive been reading the undefined variables are from a Nil value which causes the variable to become undefined. You probably knew this already but Ive been looking into fixing the 2.3 I currently have since its just a constant stream of these errors.

JoSchaap commented 10 years ago

the undefined variable errors are being triggered by defined and set variables, thats why i included the jackiechan image at the bottom of the image..

    private ["_variable"];
    _variable = 1;
    if (_variable == 1) then { diag_log "it works!"; };

run this ingame and it gives 'Undefined variable "_variable" on line 2'

... i guess my programming logic is just wrong but imho theres nothing undefined here.. then again adding isnill checks removes the black error box, but also skips the code...

s3kShUn61 commented 10 years ago

Well from my work in Java what I've seen shows that the compiler is seeing a variable, let's say _x, and that it is being set to something that has to be accessed, such as a function call to define the variable. The compiler in c++ (I believe but I am not sure) is seeing variable _x=someFunctionCallToSetX and saying there is a chance _x can be null if the method call fails or returns null. A fix would be to set _x to something definite, like 0 or whatever type _x is, before the actual _x=someFunctionCallToSetX. This will always ensure that _x is something to the compiler even if someFunctionCallToSetX returns null or fails.

AgentRev commented 10 years ago

From the tests I've done, it has nothing to do with private assignments, undefined variable means that the variable is nil.

I've only had a few errors in my mission, most of them had to do with mistyped variables, badly-structured code, or getVariable calls. I didn't get any of the specific errors from the screenshots above.

I can't possibly understand how the _variable test could possibly say undefined. Did you actually try this very code in the game?

s3kShUn61 commented 10 years ago

This is what ive found from a forum post: "I think lot of the problems with undefined variables in these scripts are due to the use of the nil command in the scripts. For example in the scripts: _milGroup = if (count _this > 9) then { _this select 9; } else {nil;};

From the wiki: Nil value. This value can be used to undefine existing variables.

This was fine in previous builds, but with the new behaviour of Arma to throw an error when a variable is undefined means that the whole way the scripts work generates lots of undefined variable errors as the author builds the core functionality on testing to see if a variable exists or is undefined. Don't get me wrong, whoever wrote it is very clever, but unfortunately, his method for the scripts has become verboten."

s3kShUn61 commented 10 years ago

And no I have not had a chance to test it, it was only an idea. Ive been very busy the past few weeks and I have had very little time to do anything.

JoSchaap commented 10 years ago

@AgentRev im typing on my cellphone (github app) so no i cant test, im on a train atm :+1: but i guess i just need to look at it from a big screen, coding on my tablet isnt going that well either. :)

will get back on this when im at home :)

AgentRev commented 10 years ago

Certain errors can be legitly corrected by using isNil (like getVariable errors), but it's not a good idea to do that everywhere, as it may hide more serious underlying issues.

About the dynamicText errors above, I'm a bit clueless, since those are core game files, so it's probably BIS that didn't do its job.

About the pickupMoney error, the answer is simple. The "Pickup money" action is shown when a moneybag is within 5m, but the actual pickup script only detects moneybags that are within 3m. Silly 404Games. The fix for this one is, at line 18 in client\actions\pickupMoney.sqf, set the 3 to something higher than 5 for margin, like 6.

JoSchaap commented 10 years ago

good lets see...

46f2f2ff75f8b06b610c8bb6738d123d619d8513 f768749133908c2ca926b39d513ccd68493246a3 7bebe8e1a02a2e5f21811440c9379236115f3765 106621cdf22d77aaca9d79581d6d1edeafa733bc 05b0662a6b12e356b13fb2d2131eacae83a7ffb1 92cdb1e474c26d4d1f6e8869bf094c87801728e8 2b856f8bf5197d6268fd7a46e55762bf74a163e5 95d46fadc2c86cb3d93384d9feaabf47a3405617

@agentrev dynamictext was due to grouptags not having _refresh defined...

i still have no clue about the random mid-air limbo respawns though

MercyfulFate commented 10 years ago

sounds like something going wrong in the arma engine, rather than the scripting. I cant seem to reproduce any errors (other than the mid air-respawns) on either 2.3 code, or my inventory code.

AgentRev commented 10 years ago

Most of these errors are related to interactions with other live players, so if you are playing alone, you most likely won't be able to reproduce them.

JoSchaap commented 10 years ago

@s3kShUn61 thanks for joining the game so i could test the tags changes :P

s3kShUn61 commented 10 years ago

@JoSchaap Np man, anything to help get this build ready :D

SCETheFuzz commented 10 years ago

You guys still in server?

JoSchaap commented 10 years ago

no but the help was usefull new build comming up soon :)

JoSchaap commented 10 years ago

ok so the only issue left is to fix the hud_icon error.

i thought it was just me having this. but im currently watching a livestream of someone playing on the TPG server and he's also getting the error..

errorpopup

once this one has a resolution (but ive tried about anything allready) its not far from making a release :)

s3kShUn61 commented 10 years ago

Got one for ya, my admins showed me how you can access the gunstore menu, then continue to walk while the menu is open allowing a player to leave the gunstore and buy items. Just set a proximity like picking up money?

SCETheFuzz commented 10 years ago

Can we test out the player team unlock ?

JoSchaap commented 10 years ago

Team unlock should work.

As for the stores. Ill see if i can lock the player so movement is out of the question :)

s3kShUn61 commented 10 years ago

Can you also lock the gunstore AI? I know movement is disabled but players can push them away using vehicles. We were able to push him to our base XD

JoSchaap commented 10 years ago

hehehe, i'm not sure, have to look into that :)

AgentRev commented 10 years ago

I've looked at a lot of stuff regarding the error in the last screenshot above. If I play alone and I start creating friendly units using the Proving Grounds console, the error always appears after I spawn the 46th unit. I've increased the player icons in clients\system\newicons.hpp to 100, but it still shows.

My theory would be that something is being accessed too often when refreshing the icons, and it makes the script unstable. The best bet would to be simply add isNil's before every reference to FZF_IC_Hud_Disp and HUD_ICON in client\functions\newPlayerIcons.sqf, and probably refactor the script too because it's especially inefficient, not to say a pile of junk.

JoSchaap commented 10 years ago

ok new testbuild up on the servers

password borrelnoot

@AgentRev, hud_icon seems to be an issue in all missions that use it :/ even seen it pop up on Sama's version while watching streams yesterday

AgentRev commented 10 years ago

I will rewrite newPlayerIcons.sqf and see how that goes.

AgentRev commented 10 years ago

An idea to prevent gunstore NPCs from moving would to "glue" them to the building they are in with attachTo. Will write something.

s3kShUn61 commented 10 years ago

Will they stay after the building is destroyed. What happens as far as I know is the airbase gunstore building is no-clipped after being destroyed. I dont know if that will affect attachTo.

AgentRev commented 10 years ago

Hmm you're right... I was thinking about making gunstore buildings invulnerable, thought.

AgentRev commented 10 years ago

Something like this added to the NPC's init field might do it:

_gunStore = nearestObject [this, 'Building']; _gunStore addEventHandler ['HandleDamage', {false}]; this attachTo [_gunStore, _gunStore worldToModel getPos this];

The only things I'm not sure of are if the NPC will keep facing the same direction, and if having a private variable (_gunStore) in an init field is possible, will have to test.

s3kShUn61 commented 10 years ago

Making the buildings invulnerable would be a great idea. I've quite a few asshats who like to say they are attacking a player with RPGs and will blow up all the gunstore buildings. That would be an easy solution.

JoSchaap commented 10 years ago

or just ad some setpos commands to the cleanup that reverts the gunstores to their original location/direction? :)

or add them to a respawn like vehicles :P

AgentRev commented 10 years ago

Found something much simpler on the BIS forums:

Simply put this enableSimulation false in the plane's init field. That sucker won't budge. Ram into it, shoot it, nuke it... it's not gonna bat an eyelash at you.

Will have to test.

JoSchaap commented 10 years ago

That should fix it indeed :)

JoSchaap commented 10 years ago

seems to work sofar the ai didnt budge :)

SCETheFuzz commented 10 years ago

http://steamcommunity.com/sharedfiles/filedetails/?id=165222385

from selling my gear at the gun store.

JoSchaap commented 10 years ago

Nice find :)

AgentRev commented 10 years ago

Yeah that's my fault, I mixed up the S and Z. Just replace all _magasines to _magazines. Maybe I should actually commit corrections I make after writing them, lol.

JoSchaap commented 10 years ago

i allready spotted that :) but thanks for the reply :)

SCETheFuzz commented 10 years ago

Need another round of testing?

JoSchaap commented 10 years ago

its on the server if youre bored :)

JoSchaap commented 10 years ago

updated opening message, all should be fixed, just need some ppl to test if any new errors occurr (at work, cant test)

both servers are running the build now

password:

       borrelnoot
SCETheFuzz commented 10 years ago

Will jump on right now maybe let us test drive it on our servers in say 9 hours after I wake up?

SCETheFuzz commented 10 years ago

http://cloud-2.steampowered.com/ugc/920143977343749850/5BBA6C6C214106504B6884D1361CF271693FBECD/ http://cloud.steampowered.com/ugc/920143977343747359/C4CB929CE7A430A99E52600A8C883D2D5C519820/

Also Blue team and Red team have no team markers

Going to make you a base to look at when you get home :)

JoSchaap commented 10 years ago

The hud error is something i forgot to remove. Will fix that soon. But the error you get in the lobby is just wierd. :)

JoSchaap commented 10 years ago

ok the hud error has been fixed in the source: 52345e25a7f429a69c8ebe80addfeecd79bc2824

@SCETheFuzz can you provide me the logs about the error in the second screenshot,

the clientsided RPT logfiles are found by browsing to

      %APPDATA%\..\Local\Arma 3\

using windows explorer (just paste it into the location bar)

you can also pastebin the entire logfile (just from the past hour) and post a link here :)

AgentRev commented 10 years ago

The lobby error is BIS' fault.