Thug Posted May 8, 2015 Report Share Posted May 8, 2015 (edited) [SOLVED] Can someone PLEASE tell me what is wrong with the following. All I see is the flag pole. I get this warning in the RPT: Warning Message: Cannot load texture mpmissions\dayz_epoch_17.chernarus\flag.jpg. I have my picture in the root of the mission side. its call flag.jpg. its 512x256. The following is my script, it is called flag.sqf and it is located in the mission side at signs_flags\flag.sqf if (isServer) then { _vehicle_4 = objNull; if (true) then { _this = createVehicle ["FlagCarrierWhite_EP1", [6354.6543, 7792.2114, -0.00012207031], [], 0, "CAN_COLLIDE"]; _vehicle_4 = _this; _this setDir 127.06387; _this setPos [6354.6543, 7792.2114, -0.00012207031]; _this setFlagTexture 'flag.jpg'; }; }; I call the above from the init.sqf []execVM "signs_flags\flag.sqf"; Edited June 26, 2017 by Thug [SOLVED] Link to comment Share on other sites More sharing options...
0 Halvhjearne Posted May 11, 2015 Report Share Posted May 11, 2015 Would you be will to send me the image you used so i could check to see if thats the problem? if so [email protected] I tried a 200x200 and still get the error my picture was originally 1600x1200 i think, its nothing special and you can have it if you like, but perhaps your problem lies with the picture editor you use. idk what software you use, but personally i use gimp. it is free and it has worked for me every time so far. Because somestimes files won't load, if in root directory. never heard of that before ... Link to comment Share on other sites More sharing options...
0 Thug Posted May 11, 2015 Author Report Share Posted May 11, 2015 Thug just a smal question: Is the Image File actually in your Root Directory of the Mission Folder or is it in another Folder? Because somestimes files won't load, if in root directory. Folder Link to comment Share on other sites More sharing options...
0 Thug Posted May 11, 2015 Author Report Share Posted May 11, 2015 my picture was originally 1600x1200 i think, its nothing special and you can have it if you like, but perhaps your problem lies with the picture editor you use. idk what software you use, but personally i use gimp. it is free and it has worked for me every time so far. never heard of that before ... I use Photoshop 6, I have no problem with the signs, the pictures I use work on first try. Its just the Flags. Yes i would like to try is out, Thank you. [email protected] Link to comment Share on other sites More sharing options...
0 Thug Posted May 13, 2015 Author Report Share Posted May 13, 2015 my picture was originally 1600x1200 i think, its nothing special and you can have it if you like, but perhaps your problem lies with the picture editor you use. idk what software you use, but personally i use gimp. it is free and it has worked for me every time so far. never heard of that before ... Ok I used your flag and still Warning Message: Cannot load texture mpmissions\dayz_epoch_17.chernarus\dkflagpole.jpg. I will try it in a folder, i will try it on a bike, i will try it with a kite. lol at this point i will try almost any thing. Link to comment Share on other sites More sharing options...
0 SchwEde Posted May 13, 2015 Report Share Posted May 13, 2015 i never messed around that much with setting any kind of texture, only thing i can tell you here is that you are setting the texture in the isServer Section. The Flag which is shwoing my Server logo is spawned client sided (check the Code). Means the set texture command needs to be local? Maybe i will mess around with this in the near future, but for now only thing i have found that the object needs to be client sided Link to comment Share on other sites More sharing options...
0 Thug Posted May 13, 2015 Author Report Share Posted May 13, 2015 i never messed around that much with setting any kind of texture, only thing i can tell you here is that you are setting the texture in the isServer Section. The Flag which is shwoing my Server logo is spawned client sided (check the Code). Means the set texture command needs to be local? Maybe i will mess around with this in the near future, but for now only thing i have found that the object needs to be client sided Thank you for the reply. Where you say: you are setting the texture in the isServer Section. Are you talking about the init.sqf? The object you talk about is the Picture? Link to comment Share on other sites More sharing options...
0 Halvhjearne Posted May 13, 2015 Report Share Posted May 13, 2015 Ok I used your flag and still Warning Message: Cannot load texture mpmissions\dayz_epoch_17.chernarus\dkflagpole.jpg. I will try it in a folder, i will try it on a bike, i will try it with a kite. lol at this point i will try almost any thing. not sure what you are doing wrong here, i think you are missing something simple somewhere, but i cant really pinpoint it and its hard to know what you are actually doing ... had this been in arma 3 i would have said its most likely cause you are blocking the extension, but this is arma 2 section so i guess thats not the problem ... Link to comment Share on other sites More sharing options...
0 Thug Posted May 13, 2015 Author Report Share Posted May 13, 2015 not sure what you are doing wrong here, i think you are missing something simple somewhere, but i cant really pinpoint it and its hard to know what you are actually doing ... had this been in arma 3 i would have said its most likely cause you are blocking the extension, but this is arma 2 section so i guess thats not the problem ... thank you anyhow Thug Link to comment Share on other sites More sharing options...
0 Thug Posted May 13, 2015 Author Report Share Posted May 13, 2015 If you have (and i'm talking about anyone) a working flag script. Can you post the hole flag script, that includes telling me EXACTLY where you put all the files, if its server side or mission side. What folders they go in. What the name of the folders are. Including the picture size (200x200, 256x256 and i.e. 20kb) you used and location where you put the picture (root of mission side or in folder). Please DO NOT ASSUME I KNOW ANYTHING,sorry for caps Im not yelling. I know enough to keep 7 servers running and to let this script just get to me. I know it works, heck I,ve seen it before on other servers and some of you that have posted have it working. OK I will say it, I need someone to hold my hand on this one so I can move on. lol I have tried to piece together all the information above and i cant get it to work. Also thanks to the many replys you guys/gals have posted, this is what I like about this forum. Thug :wacko: [email protected] p.s. Please do not think I have not tried to work with this script, I have spent countless attempts to get it to work. Thank you Link to comment Share on other sites More sharing options...
0 Halvhjearne Posted May 13, 2015 Report Share Posted May 13, 2015 lots of people already posted scripts or snipets you can use ... this means its in root folder of your mission.pbo (along side with the init.sqf, mission.sqm and description.ext): "picture.jpg" if you put it in a folder of your mission, it will then be: "myfolder\picture.jpg" the picture HAVE to be in the mission so every client downloads it or it will not work, it does not matter where in your mission.pbo it is, it is also irrelevant to execute on all client as the command is mp compatible. Link to comment Share on other sites More sharing options...
0 SchwEde Posted May 13, 2015 Report Share Posted May 13, 2015 there is something i'm overlooking here too. I have the same problem here, if i spawn the flag local on each client everything is fine, but as soon as i spawn it only via server it can not load in the texture for some reason. I've seen other doing it the exact same way, but for any reason its not working this way here =/ I will see whats causing this problem and check for anything related to this :) Link to comment Share on other sites More sharing options...
0 Thug Posted May 14, 2015 Author Report Share Posted May 14, 2015 lots of people already posted scripts or snipets you can use ... this means its in root folder of your mission.pbo (along side with the init.sqf, mission.sqm and description.ext): "picture.jpg" if you put it in a folder of your mission, it will then be: "myfolder\picture.jpg" the picture HAVE to be in the mission so every client downloads it or it will not work, it does not matter where in your mission.pbo it is, it is also irrelevant to execute on all client as the command is mp compatible. I got it that the picture has to be on mission side root and that is where i put it, right above the init.sqf On the server side where does the flag.sqf need to be, in what folder? Do i put []execVM "\z\addons\dayz_server\addons\flag.sqf"; in the server_functions.sqf file? because that is where i have it. the file is in a folder named addons in the root of the server side pbo. this is the script that I am trying now flag.sqf even with your flag it will not work. if (isServer) then { _vehicle_1 = objNull; if (true) then { _this = createVehicle ["FlagCarrierWhite_EP1", [13348.2,12058.2,0.00151825], [], 0, "CAN_COLLIDE"]; _vehicle_1 = _this; _this setDir -90.00; _this setFlagTexture 'flag.jpg'; _this setPos [13348.2,12058.2,0.00151825]; }; }; Link to comment Share on other sites More sharing options...
0 Thug Posted May 14, 2015 Author Report Share Posted May 14, 2015 there is something i'm overlooking here too. I have the same problem here, if i spawn the flag local on each client everything is fine, but as soon as i spawn it only via server it can not load in the texture for some reason. I've seen other doing it the exact same way, but for any reason its not working this way here =/ I will see whats causing this problem and check for anything related to this :) thank you, Link to comment Share on other sites More sharing options...
0 Guest Posted May 15, 2015 Report Share Posted May 15, 2015 there is something i'm overlooking here too. I have the same problem here, if i spawn the flag local on each client everything is fine, but as soon as i spawn it only via server it can not load in the texture for some reason. I've seen other doing it the exact same way, but for any reason its not working this way here =/ I will see whats causing this problem and check for anything related to this :) Just ignore, that i already explained the reason, why. Burried under those answers Link to comment Share on other sites More sharing options...
0 SchwEde Posted May 15, 2015 Report Share Posted May 15, 2015 ok i found whats causing this problem :) to get this done you will have to put your mission in a .pbo! The reason is simple: If its not packed and a texture is set through the server the client will search in MPMission\DayZ_Epoch_XX.Worldname\Folder but you dont have that in your arma folder, so it can not load in the texture! So just pack that thing and use a pbo ;) Link to comment Share on other sites More sharing options...
0 Thug Posted May 15, 2015 Author Report Share Posted May 15, 2015 ok i found whats causing this problem :) to get this done you will have to put your mission in a .pbo! The reason is simple: If its not packed and a texture is set through the server the client will search in MPMission\DayZ_Epoch_XX.Worldname\Folder but you dont have that in your arma folder, so it can not load in the texture! So just pack that thing and use a pbo ;) on my chernarus map which I have on my home server and the one online, Both server side and mission side run off PBOs Link to comment Share on other sites More sharing options...
0 Thug Posted May 15, 2015 Author Report Share Posted May 15, 2015 Thug just a smal question: Is the Image File actually in your Root Directory of the Mission Folder or is it in another Folder? Because somestimes files won't load, if in root directory. just getting back with update, I have tried in root and folder Link to comment Share on other sites More sharing options...
0 Thug Posted May 15, 2015 Author Report Share Posted May 15, 2015 Hi, Just a smal addition: In the BI Page it is saying, that jpg can be used but this is only partly correct, as server side jpg files are not passed to the client. The client downloads the mission folder only, so executing this on server would cause the issue that you are getting, as the texture can not be downloaded. Ofc schwedes way is a fix for that, but you can allways define the image in your description.ext, which will in return allow you to set the object texture server sided, without the need of counting all flags + you then can have individual flags. I'm on my phone atm, but schwede is a good scripter, im sure if he quickly reads in to that he could provide an example. you said: you can always define the image in your description.ext, can you please show me an example? I am going back through all the post now and for each person that post, I am trying their post. Hopefully I get this right. There is a second question: I have noticed that for example when you look at some of the post in this line: _this SetFlagTexture "flags\ch.jpg"; they us " "; and in _this SetFlagTexture 'flags\ch.jpg'; they use ' '; which is right. I have tried both with no luck. Link to comment Share on other sites More sharing options...
0 SchwEde Posted May 15, 2015 Report Share Posted May 15, 2015 after i packed everything into a pbo the flags worked just fine and since you get the exact same rror i would guess its loading (for any reason) from an folder and not an pbo if you navigate to C:\Users\YOURUSERNAME\AppData\Local\ArmA 2 OA\MPMissionsCache and check if your mission is called: __cur_mp.pbo If so, this means its loading from a folder and not a pbo. Link to comment Share on other sites More sharing options...
0 Thug Posted May 15, 2015 Author Report Share Posted May 15, 2015 after i packed everything into a pbo the flags worked just fine and since you get the exact same rror i would guess its loading (for any reason) from an folder and not an pbo if you navigate to C:\Users\YOURUSERNAME\AppData\Local\ArmA 2 OA\MPMissionsCache and check if your mission is called: __cur_mp.pbo If so, this means its loading from a folder and not a pbo. https://dl.dropboxusercontent.com/u/27826044/pbo%20list.PNG the above is what is in my C:\Users\YOURUSERNAME\AppData\Local\ArmA 2 OA\MPMissionsCache folder Link to comment Share on other sites More sharing options...
0 SchwEde Posted May 15, 2015 Report Share Posted May 15, 2015 check the pbo called: __cur_mp.pbo Check if its your current mission which is you are testing on getting the flags done. Link to comment Share on other sites More sharing options...
0 theduke Posted September 24, 2016 Report Share Posted September 24, 2016 @Thug have you ever been able to get the flags working? IF not, i have a few different ways that does work. By reading this it seems the issue from the beginning was a image problem. Link to comment Share on other sites More sharing options...
0 Thug Posted September 25, 2016 Author Report Share Posted September 25, 2016 @thedukenever was able to get it to work. Link to comment Share on other sites More sharing options...
0 juandayz Posted June 25, 2017 Report Share Posted June 25, 2017 @theduke @Thug 1-at bottom of server_functions.sqf call compile preProcessFileLineNumbers "z\addons\dayz_server\init\flag.sqf"; 2-into dayz_server.pbo\init\ create flag.sqf Spoiler _pos = [3414.6799, 3942.7075, 3.0517578e-005];//put your own coord _flag = "FlagCarrierCDF" createVehicle _pos; _flag setFlagTexture "scripts\flag.jpg"; 3-create the flag.jpg into mpmissions\your instance\scripts\ 4-repack dayz_server.pbo and VERY IMPORTANT also pack your instance.pbo Thug 1 Link to comment Share on other sites More sharing options...
0 Anhor Posted June 26, 2017 Report Share Posted June 26, 2017 By myself I´m using this, called flag.sqf: Spoiler if (isServer) then { // 1 _vehicle_484 = objNull; if (true) then { _this = createVehicle ["FlagPole_EP1", [11852.1,12619.7,0.00143433], [], 0, "CAN_COLLIDE"]; _vehicle_484 = _this; _this setDir 23.9736; _this setPos [4581.11,7590.37,0.00143886]; _this setFlagTexture 'textures\flag.paa'; }; // 2 _vehicle_484 = objNull; if (true) then { _this = createVehicle ["FlagPole_EP1", [11852.1,12619.7,0.00143433], [], 0, "CAN_COLLIDE"]; _vehicle_484 = _this; _this setDir 23.9736; _this setPos [4575.45,7589.93,0.00143886]; _this setFlagTexture 'textures\flag.paa'; }; }; As you see, I converted my image to an .paa This works perfect for me. Thug and juandayz 2 Link to comment Share on other sites More sharing options...
Question
Thug
[SOLVED]
Link to comment
Share on other sites
50 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now