Jump to content

Photo
- - - - -

Command to prevent error-messages


  • Please log in to reply
16 replies to this topic
Thread Starter
roguetrooper
roguetrooper

    Master Sergeant

  • Members
  • 672 posts

  • Joined: 19-December 2007

Posted 13 March 2012 - 09:07 #1

It would be nice to have a command (to be put into description.ext or into a sqf/sqs or into a trigger) that prevents the error messages of -showscripterrors. This command should have a higher priority than -showscripterrors in the Arma-desktop-link.

You could add this command to your map when you are about to release it and you are sure everything works fine. So you could be 101% sure that your "customers" will not annoyed by that black error box although the map works perfectly but you forgot to remove/change a litte remnant of your 10000 lines of code that actually has no impact on the map's gameplay.

YES, I KNOW: You could just remove -showscripterrors from your Arma-link, but actually nobody who uses that parameter will remove it (since it's a precious tool - for mapmakers).

Edit: This command should also prevent the pop-up-error-dialogues that have to be confirmed by mouse-click. And maybe also the entries to the rpt-file.

Edited by RogueTrooper, 13 March 2012 - 09:11.


.kju -PvPscene-
.kju -PvPscene-

    Brigadier General

  • Members
  • 12275 posts

  • Joined: 20-October 2001

Posted 13 March 2012 - 09:30 #2

why not simply use two links to arma.exe with different params?
developer.lnk
play.lnk



Current active projects: None :(

Maintained/assisted projects: IFA3, Blitzkrieg


Help: Got a crash? Report it! What is the RPT log file?


MadDogX
MadDogX

    Mindless F@nb0!

  • Moderator
  • 9050 posts

  • Joined: 04-November 2002

Posted 13 March 2012 - 09:41 #3

This doesn't seem like a good idea to me at all.

If you have some obscure bug somewhere in the code that breaks the mission in certain situations, good luck troubleshooting it if the mission just swallows the error and silently goes FUBAR. At least if an error message is thrown, the players will be able to report it so you can track it down. Without an error message, people will simply complain about the mission breaking somewhere and you will be none the wiser. This is probably more likely to drive away your "customers" than an error message.

Gigabyte Z97-HD3 Motherboard | Intel Core i5 4690k @ 4.5GHz | NVidia GTX 970
16GB G-Skill Ripjaws 2133MHz RAM | Kingston HyperX SSD | be Quiet! 750W PSU

Thread Starter
roguetrooper
roguetrooper

    Master Sergeant

  • Members
  • 672 posts

  • Joined: 19-December 2007

Posted 13 March 2012 - 17:13 #4

You may be right. But to enhance the practical value of those blackbox-messages, they should contain the file and line:
part of corrupted code
kind of error
file.sqf, line 34

The current scrap of message isn't THAT useful in certain situations.

Edited by RogueTrooper, 13 March 2012 - 17:21.


Jedra
Jedra

    Warrant Officer

  • Members
  • 2048 posts

  • Joined: 07-March 2011

Posted 13 March 2012 - 17:18 #5

Then the script-error-message should at least contain the file name and the line, eg:

part of corrupted code
kind of error
file.sqf, line 34


It does sometimes! I know what you mean though. Don't worry though as a year from now we'll all be debugging in a Java IDE ;-)
Jedra's Addons
Arma 2 : Enhanced Skills Slider
Take On Helicopters : Take On Taxi | Jedra's Time Trials | Weapon Indicators | No Radar

Xeno
Xeno

    ACE Team Leader

  • Members
  • 1814 posts

  • Joined: 20-April 2007

Posted 15 March 2012 - 00:48 #6

RogueTrooper, most of your problems will go away immediately if you finally STOP mixing up sqf and sqs like many people told you already x times.
If you stop using sqs constructs like goto and jump labels in sqf then you won't see such error messages anymore!

Xeno
[SIZE=1][/SIZE]

Thread Starter
roguetrooper
roguetrooper

    Master Sergeant

  • Members
  • 672 posts

  • Joined: 19-December 2007

Posted 15 March 2012 - 08:15 #7

RogueTrooper, most of your problems will go away immediately if you finally STOP mixing up sqf and sqs like many people told you already x times.
If you stop using sqs constructs like goto and jump labels in sqf then you won't see such error messages anymore!

Xeno


Lol, I absolutely have no error messages from what you said. In almost all my sqF files I have goto and such without the faintest error message. I only have (until I fix it) error messages from REAL logical/typing mistakes, like setpos for an object that doesn't exist or a wrong amount of {[(

Serclaes
Serclaes

    Master Sergeant

  • Members
  • 775 posts

  • Joined: 27-November 2005

Posted 15 March 2012 - 13:33 #8

And as it seems, a lot of runtime errors that you apparently can't figure out because it's pretty hard to debug spaghetti code. ;)

Xeno
Xeno

    ACE Team Leader

  • Members
  • 1814 posts

  • Joined: 20-April 2007

Posted 15 March 2012 - 13:54 #9

Lol, I absolutely have no error messages from what you said. In almost all my sqF files I have goto and such without the faintest error message. I only have (until I fix it) error messages from REAL logical/typing mistakes, like setpos for an object that doesn't exist or a wrong amount of {[(

Just look at your last post in the editing forums... You post a sqs code snippet and write that's what's in your sqf file. Or look what you wrote here: "In almost all my sqF files I have goto"... there is no goto in sqf.

Anyways, that the sqf parser has some problems with missing {} or sometimes even silently does nothing when there is something wrong with preprocessor stuff in scripts is something which is known for years and is frustrating as it costs lots of time to find the issue, there is also an old CIT ticket about it (and at least one more experienced modder has left the game already because of that issue (and other issues)).
The sqf parser should get improved, if that's what this thread is about.

But, again, many of your own problems happen because you simply refuse to separate sqs from sqf. Either use sqs or use sqf.

Xeno
[SIZE=1][/SIZE]

.kju -PvPscene-
.kju -PvPscene-

    Brigadier General

  • Members
  • 12275 posts

  • Joined: 20-October 2001

Posted 15 March 2012 - 13:58 #10

Use squint in addition.



Current active projects: None :(

Maintained/assisted projects: IFA3, Blitzkrieg


Help: Got a crash? Report it! What is the RPT log file?


Thread Starter
roguetrooper
roguetrooper

    Master Sergeant

  • Members
  • 672 posts

  • Joined: 19-December 2007

Posted 15 March 2012 - 15:30 #11

Just look at your last post in the editing forums... You post a sqs code snippet and write that's what's in your sqf file. Or look what you wrote here: "In almost all my sqF files I have goto"... there is no goto in sqf.


Create a file.sqF with
_a = 0;
goto "jumpto";
hint "this message won't be shown";
_a = _a+1;
#jumpto
_a = _a+1;
~5.0
if (_a==1) then {hint format ["%1",_a]};
exit;

and execute it by [] exec "file.sqf"; in your init.sqs or in a trigger.

Why then is there NO hint "this message won't be shown" and no blackbox-error message? Why then is _a == 1 at the end of the file? Why then does this sqf (f like fox) executed with [] exec "file.sqf" work as expected and without any errors? I do not understand why people maintain this example would not work whereas it works without any error or problems. :confused:

Why then does this code work when "there is no goto in sqf" ? :confused:

MadDogX
MadDogX

    Mindless F@nb0!

  • Moderator
  • 9050 posts

  • Joined: 04-November 2002

Posted 16 March 2012 - 13:33 #12

That explains a lot.

You're executing the file using "exec" instead of "execVM", which means it will be run as an SQS script, regardless of the file extension. (If I'm not mistaken.)

You are essentially still writing and running SQS scripts, but merely mislabeling them as SQF.

Gigabyte Z97-HD3 Motherboard | Intel Core i5 4690k @ 4.5GHz | NVidia GTX 970
16GB G-Skill Ripjaws 2133MHz RAM | Kingston HyperX SSD | be Quiet! 750W PSU

Dwarden
Dwarden

    BI Developer

  • 9654 posts

  • Joined: 05-March 2002
  • LocationBrno, Czech Republic

Posted 16 March 2012 - 16:15 #13

Exec is for SQS code
http://community.bis...o.com/wiki/exec


ExecVM is for SQF code
http://community.bis...com/wiki/execVM

as MaddogX wrote, You don't use SQF syntax http://community.bistudio.com/wiki/sqf
but in fact still using obsolete SQS syntax http://community.bis...wiki/SQS_syntax

:rolleyes:FPDR

RealTimeChat ~ARMA2 in Your browser (w/o Java), RealTimeChat ~ARMA3 in Your browser (w/o Java),
irc.GameSurge.net/ARMA2 (external IRC clients) irc.GameSurge.net/ARMA3 (external IRC clients)
ARMA 3 Feedback Tracker: http://feedback.arma...y_view_page.php
~100k fans @STEAM ARMA 2 + ARMA 2: OA + ARMA 3: + ~2k @XFIRE A2:OA
Follow my Twitter: http://twitter.com/FoltynD or my Facebook http://facebook.com/FoltynD


tankbuster
tankbuster

    First Lieutenant

  • Members
  • 5340 posts

  • Joined: 14-June 2005

Posted 16 March 2012 - 17:50 #14

:FPDR


Indeed.
Documentation is not a dirty word.
: TeamSPAFF : PRACS : RKSL : Stella Artois : Creme Eggs : Elite Warriors :

Making working streetside IEDs since 2011.

mr burns
mr burns

    OFP slut

  • Members
  • 6052 posts

  • Joined: 23-February 2003

Posted 18 March 2012 - 15:14 #15

*stares at avatar*

whoaw, you bought BI, what kind of a nice birthday present is that :eek:
Posted Image
REALISM! No, fuck that, FIRE THE LASER!

tankbuster
tankbuster

    First Lieutenant

  • Members
  • 5340 posts

  • Joined: 14-June 2005

Posted 18 March 2012 - 15:49 #16

:cool:
Documentation is not a dirty word.
: TeamSPAFF : PRACS : RKSL : Stella Artois : Creme Eggs : Elite Warriors :

Making working streetside IEDs since 2011.

Jedra
Jedra

    Warrant Officer

  • Members
  • 2048 posts

  • Joined: 07-March 2011

Posted 19 March 2012 - 20:46 #17

You're so gonna get infracted with that avatar ;-) Doesn't FADE get triggered by that sort of thing?
Jedra's Addons
Arma 2 : Enhanced Skills Slider
Take On Helicopters : Take On Taxi | Jedra's Time Trials | Weapon Indicators | No Radar