Jump to content
Sign in to follow this  
Lolnut

I'm getting tired, This script is eating my soul. Help requested!

Recommended Posts

Hello everybody, my first post...I can't seem to figure out what is going on in my script. It will run up until it gets to the switch statement. It'll still remove all of the items and weapons from my character and display the hint _theRole but it stops there it doesn't even jump over the switch statement and display hint "teh hcek?"...Any ideas because I just can't figure it out...

handle = [this, "AT1"] execVM "OpSTD01Init.sqf";

I put this into the Init of the player or other units I want.

_theGuy = _this select 0;
_theRole = _this select 1;



removeAllItems _theGuy;
removeAllWeapons _theGuy;
hint _theRole;

switch(_theRole) do
{
case "AT1": 
{
	_theGuy addWeapon "NVGoggles";
	_theGuy addMagazine "30rnd_65x39_caseless_mag";
	_theGuy addMagazine "16rnd_9x21_mag";
	_theGuy addMagazine "RPG32_F";
	_theGuy addWeapon "arifle_MXC_F";
	_theGuy addWeapon "hgun_PO7_F";
	_theGuy addWeapon "M_RPG32_F";
	_theGuy addMagazines ["30rnd_65x39_caseless_mag", 9];
	_theGuy addWeapon "NVGoggles";
	_theGuy addMagazines ["16rnd_9x21_mag, 2];
	hint _theRole;
};
default 
{
	hint "lolz wut";
};
};
hint "teh hcek?";

I'm dumb struck, if you need more info leme know.

Share this post


Link to post
Share on other sites

Hi,

you are missing a "

It's quite obvious with syntax highlighting:

86015-syntax.jpg

:)

Share this post


Link to post
Share on other sites

_theGuy addMagazines ["16rnd_9x21_mag, 2];

missing a "

_theGuy addMagazines ["16rnd_9x21_mag", 2];

.. any good editor like notepad ++ with the arma defines is nice.. error was spotted as soon as loaded.. or squint is a good one as well.

https://sites.google.com/site/macsarmatools/squint

edit: yeah sxp2high beat me to it. :)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×