ANGRY_FARMER 10 Posted March 4, 2018 hello guys, is there any *.sqs to *.sqf converter program ? i tried to do it manually, but its a mess...i'm not used to "goto" command and have lot of troubles re-thinking the logic behind the script ! thanks for any help! Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted March 4, 2018 2 minutes ago, ANGRY_FARMER said: hello guys, is there any *.sqs to *.sqf converter program ? i tried to do it manually, but its a mess...i'm not used to "goto" command and have lot of troubles re-thinking the logic behind the script ! thanks for any help! At this point with the plethora of new script commands introduced during the lifetime of A3 I'd say rewrite it and use the opportunity to learn the new commands. If you can't rethink the logic of your own script it's probably due anyway. Cheers 1 Share this post Link to post Share on other sites
.kju 3245 Posted March 4, 2018 https://community.bistudio.com/wiki/SQS_to_SQF_conversion 1 Share this post Link to post Share on other sites
ANGRY_FARMER 10 Posted March 4, 2018 ...so the answer is "no, there' isnt any way to automatically convert it" ? Share this post Link to post Share on other sites
Tankbuster 1746 Posted March 4, 2018 17 minutes ago, ANGRY_FARMER said: ...so the answer is "no, there' isnt any way to automatically convert it" ? No, there isn't. Once you get your head around the lack of goto and such like, it's much the same, only bigger. 1 Share this post Link to post Share on other sites
AZCoder 921 Posted March 4, 2018 I think there are many cases where people don't understand SQS, but need to convert multiple SQS scripts to SQF which they do understand. The OP indicated lack of understanding of SQS, not the latter, and yeah SQS is confusing to read. 1 Share this post Link to post Share on other sites
ANGRY_FARMER 10 Posted March 4, 2018 exactly as AZcoder say, thanks for understanding it :) 3 Share this post Link to post Share on other sites
ANGRY_FARMER 10 Posted March 5, 2018 yeah Haz, i agreee :) to cut it short i have to resume this piece of old work exactly as it is, so i really have to convert it somehow. what you suggest guys...convert goto with functions seems not covering all the possible situations....in fact goto keeps the potential changes in its code and carry them back to the top of the code, seems quite complex to me to reproduce this logic for a complex script... Share this post Link to post Share on other sites
ANGRY_FARMER 10 Posted March 5, 2018 i post the file i have to convert, just in case its useful to understand better my trouble: Spoiler _count = 0 _total = Count clientCommandPV _param1 = 0 _param2 = 0 _param3 = 0 #CheckForCommand ~0.1 _command = Call Compile Format["%1",clientCommandPV Select _count] if (_command != 0) then {Goto "RunCommand"}; #CheckForNextCommand _count = _count + 1 if (_count < _total) then {Goto "CheckForCommand"}; _count = 0 goto "CheckForCommand" #RunCommand clientCommandsSent = clientCommandsSent + 1 _side = 0 _parameters = 0 if (_command >= CMDPARAMETERBIT1) then {_parameters = 2;_command = _command - CMDPARAMETERBIT1}; if (_command >= CMDPARAMETERBIT0) then {_parameters = _parameters + 1;_command = _command - CMDPARAMETERBIT0}; if (_command >= WESTID) then {_side = WESTID;_command = _command - WESTID}; if (_command >= EASTID) then {_side = EASTID;_command = _command - EASTID}; if (_side != 0 && _side != sideID) then {Goto "ClearCommand"}; if (_command != 0 && _command != clientID) then {Goto "ClearCommand"}; _params = [] if (_parameters > 0) then {Call Compile Format["_param1 = %1P1",clientCommandPV Select _count];_params = _params + [_param1]}; if (_parameters > 1) then {Call Compile Format["_param2 = %1P2",clientCommandPV Select _count];_params = _params + [_param2]}; if (_parameters > 2) then {Call Compile Format["_param3 = %1P3",clientCommandPV Select _count];_params = _params + [_param3]}; Call Compile Format["_params Spawn CLTFNC%1",clientCommandPV Select _count] #ClearCommand publicVariablesSent = publicVariablesSent + _parameters + 2 Call Compile Format["%1 = 0",clientCommandPV Select _count] Goto "CheckForNextCommand" Share this post Link to post Share on other sites
dr death jm 117 Posted March 6, 2018 I'm pretty sure then won't work in sqs. It needs to be : ? = if ! = not : = then @ = wait until 1 Share this post Link to post Share on other sites