Guest User

Untitled

a guest
Sep 22nd, 2016
337
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. /*
  2. File: fn_mresToArray.sqf
  3. Author: Bryan "Tonic" Boardwine";
  4. Description:
  5. Acts as a mres (MySQL Real Escape) for arrays so they
  6. can be properly inserted into the database without causing
  7. any problems. The return method is 'hacky' but it's effective.
  8. */
  9. private["_array"];
  10. _array = [_this,0,"",[""]] call BIS_fnc_param;
  11. if (_array isEqualTo "") exitWith {[]};
  12. _array = toArray(_array);
  13.  
  14. for "_i" from 0 to (count _array)-1 do
  15. {
  16. _sel = _array select _i;
  17. if (_sel == 96) then
  18. {
  19. _array set[_i,39];
  20. };
  21. };
  22.  
  23. _array = toString(_array);
  24. _array = call compile format["%1", _array];
  25. _array;
Add Comment
Please, Sign In to add comment