Home   Help Search Login Register  

Author Topic: Error message with Ammo Crate Load Out  (Read 623 times)

0 Members and 1 Guest are viewing this topic.

Jasper

  • Guest
Error message with Ammo Crate Load Out
« on: 29 Jun 2004, 12:31:16 »
I only got the error message after i added this load out to the mision file.

The error message is -

Mission/Vehicles/Item.1.init': 'M' encountered instead of ';'

the load out from the mission file is -

class Item1
{
position[]={1661.708496,24.974998,5573.960449};
azimut=5.000000;
id=1;
side="EMPTY";
vehicle="ReammoBoxWest";
lock="LOCKED";
skill=0.200000;
init="this addweaponcargo ["M16",15]; this addweaponcargo ["M21",5]; this addmagazinecargo ["M16",100]; this addmagazinecargo ["M21",50]; this addweaponcargo ["LAWLauncher",5]; this addmagazinecargo ["LAWLauncher",50]; this addweaponcargo ["M60",5]; this addmagazinecargo ["M60",20]; this addmagazinecargo ["SmokeShell", 10]; this addweaponcargo ["Binocular", 5]; this addweaponcargo ["HandGrenade",15]; this addmagazinecargo ["HandGrenade",15]; this addweaponcargo ["FlareRed",15]; this addmagazinecargo ["FlareRed",15]; this addweaponcargo ["FlareGreen",15]; this addmagazinecargo ["FlareYellow",15]; this addweaponcargo ["FlareYellow",15]; this addweaponcargo ["Flare",15]; this addmagazinecargo ["Flare",15]; this addweaponcargo ["SmokeShellRed",15]; this addmagazinecargo ["SmokeShellRed",15]; this addweaponcargo ["SmokeShellGreen",15]; this addmagazinecargo ["SmokeShellGreen",15]";
};

I cant see where the mystery M is?

Jasper

  • Guest
Re:Error message with Ammo Crate Load Out
« Reply #1 on: 29 Jun 2004, 13:36:53 »
I've sorted it now but i dont know how.  

The only thing i did differently was adding the load out to the object in the editor rather than adding it to the mission.sqs!

I wouldn't have thought it would have made much difference!!

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Error message with Ammo Crate Load Out
« Reply #2 on: 29 Jun 2004, 15:34:00 »
Altough you solved it...

in mission.sqm the this addweaponcargo ["M16",15]
should be this addweaponcargo [""M16"",15]...
And so on... All strings need to be doubled, so every "" must be """"...

And, there is actually no point in adding anything via medling with the mission.sqm... ::)
Much easier in the editor, altough the init fields are one liners...

Unless you want to 'override' the 63 (or was it 64??) groups limit hasle in certain situations (Resistance and East or West need to be on the same side..) :P
« Last Edit: 29 Jun 2004, 15:35:55 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Error message with Ammo Crate Load Out
« Reply #3 on: 29 Jun 2004, 16:56:47 »
"" ... "" usually doesn't work, because the game thinks the opening of the second quote is the closing of the first ... this is a direct consequence of the morons who designed the computer industry failing to notice that opening quotes and closing quotes are not the same.

In situations like this you can use curly brackets:

"{ ... }"

which act like quotes.
Plenty of reviewed ArmA missions for you to play

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Error message with Ammo Crate Load Out
« Reply #4 on: 29 Jun 2004, 17:51:27 »
Disagreement ;D

Quote from some mission.sqm:

init="this addEventHandler [""killed"",{_this exec ""clearTank.sqs""}]";

or

init="F_leppard_1=units group this; grpF_leppard_1=group this; this setGroupID [""Zulu"",""GroupColor2""]";

::)

Same goes for .cpp...
« Last Edit: 29 Jun 2004, 17:55:04 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Jasper

  • Guest
Re:Error message with Ammo Crate Load Out
« Reply #5 on: 29 Jun 2004, 20:17:44 »
Ooooh a fight from my post ;D

But seriously, I have used the same load out cut and pasted from this thread straight into the editor and it works fine.  So I dont know if the double strings would solve the problem.

The error message suggests a typo error or something like that or is Ofp known for its cryptic error messages?

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Error message with Ammo Crate Load Out
« Reply #6 on: 29 Jun 2004, 20:36:52 »
Quote
Ooooh a fight from my post ;D
;D
Yeah right...

Quote
So I dont know if the double strings would solve the problem.
Well, it's more double quotes than double strings, but anyhoo... I explained the thing a bit poorly ::)

But yes they would, because if you now take a look at the crate in the mission.sqm you can see that altough you have only one quotes in the editor, there's double quotes in the sqm...

Quote
is Ofp known for its cryptic error messages?
In a way yes...
They are not so cryptic but they are one liners only so with a long chunk of code (or with functions) the error message is so long that you have no clue what it's about...

And that is very annoying...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Error message with Ammo Crate Load Out
« Reply #7 on: 29 Jun 2004, 22:29:10 »
The fight is not not about whether double something is required - it definitely is - but rather whether "" will do or whether you need "{.

Frankly OFP is more than capable of making one version work for me on Tuesdays and Fridays and the other work for HateR_Kint on Tuesdays and Sundays.    ;D

OFP error messages are usually accurate:  for example this one was absolutely spot on.   The game was expecting " and got M.     ("M16 instead of ""M16)    It's more often the case that the error message is right and the punter (you or me) doesn't understand it, than the error message is a bit dodgy.    Although idiosyncratic/weird error messages do occur - they are just rare.    There is no question at all that they can be a little bit cryptic (i.e. if you understood them you wouldn't have made the error in the first place.)

The bottom line is, if it works its right and if it doesn't its wrong.    It is true that sometimes you can't see the whole error message but that's usually because of the length of the line of code in question, not the length of the error message per se.

Plenty of reviewed ArmA missions for you to play

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Error message with Ammo Crate Load Out
« Reply #8 on: 30 Jun 2004, 17:01:43 »
Quote
Frankly OFP is more than capable of making one version work for me on Tuesdays and Fridays and the other work for HateR_Kint on Tuesdays and Sundays. ;D
;D
Quite...

Quote
It is true that sometimes you can't see the whole error message but that's usually because of the length of the line of code in question, not the length of the error message per se.
Indeed.
I was just generalising the issue... :P
As the code caption showed with the error message kind of belongs to the error message... ::) ;D
Now this is just getting silly ;D


Oh, and if the error message is in a readable length, the marking |#| shows you where the problem lies...
Sometimes clearly, sometimes not so clear, but it gives you the idea where to look...

Wait...
Are we still on-topic? ::)
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.