PDA

View Full Version : code change ?



deanosbeano
Dec 8 2006, 09:38
hey all
i have been using this stelite prog in ofp and decided to port to arma , but a couple of things are in my way.

1 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">onMapSingleClick &#91;_pos&#93; exec {&#34;Satellite&#92;SATmove.sqs&#34;}[/QUOTE]
SATMOVE begins <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_pos = _this select 0[/QUOTE]

this line now gives an error <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">&#124;#&#124;onmapsingleclick error type array expected string[/QUOTE]
also there is an occasional no entry config bin tahoma36b
i guess thats defined in the descript.ext
apologies to original satelite script writer theres no credits in the read me.
any help on that above code appreciated
tried removing the {`s becuase they apperntl used in call now but no joy

whisper
Dec 8 2006, 10:13
I don&#39;t see how your code could have worked in OFP. Correct syntax would be :

Quote[/b] ]onMapSingleClick {[_pos] exec "Satellite&#92;SATmove.sqs"}

deanosbeano
Dec 8 2006, 10:28
lol well that was the syntax ,but as you see in the bottom , i have removed the {`s and tried but no change.
unfortunately whilst writing the code here i have put the { back wrongly. so , same troubles just the code should have read like you have correctly typed.
thanks for spotting it and once again anyone ideas why it wont accept it in arma.

Silola
Dec 8 2006, 10:55
hi,

try this ...

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">onMapSingleClick &#34;&#91;_pos&#93;exec &#34;&#34;myScript.sqs&#34;&#34;&#34;[/QUOTE]

bye
silola

deanosbeano
Dec 8 2006, 11:06
works like a charm , thanks.
if you get time pls could you give me a break down of why it works and what changes have been introduced to change this code.

or is it simply another way of writing the 1,96 ofp code and has nothing to do with arma changes:) ?
ty in advance

whisper
Dec 8 2006, 11:25
Very strange that the {} version doesn&#39;t work http://forums.bistudio.com/oldsmileys/sad_o.gif

Benny212
Dec 9 2006, 21:20
Very strange that the {} version doesn&#39;t work  http://forums.bistudio.com/oldsmileys/sad_o.gif
just a stab in the dark but ive read that curled braces {} are used for code unlike in ofp where it was for strings. check the link below

http://community.bistudio.com/wiki/Code