1) Load MP-mission (see attache) on server and start: setvar.rar
2) Connect to mission.
3) In Debug console insert code:
obj = createVehicle ["C_Hatchback_01_F", [14851.6,16415.8,0.00144196], [], 0, "NONE"]; obj setvariable ["myvar","test",true];
4) Execute on server side only
5) Get var in debug-console (watch): cursorTarget getvariable "myvar"; and nove cursor on created car.
6) Result: "test" - it's good!
7) Disconnect from server and connect again
8) Retry get var in step 5.
9) Result: "" - not good!
if after reconnect all good with variable, retry step 3.