DevilBass 0 Posted December 27, 2009 Hello! i need some help, am not good in scripting things, i got error like thats when i launch Arma 2: Config: some input after EndOfFile. I try to test my model into arma, i add to arma shortcut: "C:\Program Files\Bohemia Interactive\ArmA 2\arma2.exe" -mod=@Security_Cam I think is my config.cpp is not corect, there! :( class CfgPatches { class dv_Is_Objects { units = {}; weapons = {""}; requiredVersion = 0.100000; }; }; class CfgVehicleClasses { class dv_Is_Objects { displayName = "Security_Addons"; }; }; class CfgVehicles { displayName = "Security Cam"; vehicleClass = "dv_Is_Objects"; model = "\Security_Cam_obj\Sec_cam.p3d"; icon = "\ca\data\data\Unknown_object.paa"; attendant = 1; scope = 2; destrType = "DestructNo"; meSound = ""; accuracy = 0.200000; mapSize = 1; }; }; I dont no what is the problem but if somone help me a bit, will be appreciate! Thanks! Share this post Link to post Share on other sites
.kju 3245 Posted December 27, 2009 class CfgPatches { class DV_Is_Objects { units[] = {"DV_Security_Cam"}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {"CABuildings2"}; version = "2009-12-27"; fileName = "dv_Is_Objects.pbo"; author = "DevilBass"; mail = "DevilBass@mail.net"; }; }; class CfgVehicleClasses { class DV_Is_Objects { displayName = "Security_Addons"; }; }; class CfgVehicles { class Strategic; class DV_Security_Cam : Strategic { scope = 2; displayName = "Security Cam"; vehicleClass = "dv_Is_Objects"; model = "\Security_Cam_obj\Sec_cam.p3d"; icon = "\ca\data\data\Unknown_object.paa"; attendant = 1;//why healing? meSound = "";//? accuracy = 0.2; mapSize = 1; }; }; Share this post Link to post Share on other sites
[frl]myke 14 Posted December 27, 2009 Your config is not even close on being correct. No offense, just commenting. ;) First of all, use code tags so your code will be better readable. Like this: class CfgPatches { class dv_Is_Objects { units = {}; weapons = {""}; requiredVersion = 0.100000; }; }; class CfgVehicleClasses { class dv_Is_Objects { displayName = "Security_Addons"; }; }; class CfgVehicles { displayName = "Security Cam"; vehicleClass = "dv_Is_Objects"; model = "\Security_Cam_obj\Sec_cam.p3d"; icon = "\ca\data\data\Unknown_object.paa"; attendant = 1; scope = 2; destrType = "DestructNo"; meSound = ""; accuracy = 0.200000; mapSize = 1; }; }; There are several problems, let us go through. First, i guess you use armaunbin to convert config.bin files to config.cpp files. Sadly armaunbin has a little bug. No big deal if you know it: it loses several characters. Let me explain with your code: units = {}; There are missing characters, it should look like this: units[] = {}; See the square brackets? Those are left out by armaunbin. Just re-add them where needed and thats it....what? How do you know where? Simple rule: If after a equal sign (=) is a curled bracket ( { ) then it needs square brackets ( [] ) before the equal sign. Regarding your code, there is one other line to fix: weapons[] = {""}; So = { needs []. Ok, to the next problem: no class defined. class CfgVehicles { displayName = "Security Cam"; vehicleClass = "dv_Is_Objects"; model = "\Security_Cam_obj\Sec_cam.p3d"; icon = "\ca\data\data\Unknown_object.paa"; attendant = 1; scope = 2; destrType = "DestructNo"; meSound = ""; accuracy = 0.200000; mapSize = 1; }; Whats its classname? You didn't set it up. Should go like this: class CfgVehicles { class <insert base class here>; class my_object: <insert base class here> { displayName = "Security Cam"; vehicleClass = "dv_Is_Objects"; model = "\Security_Cam_obj\Sec_cam.p3d"; icon = "\ca\data\data\Unknown_object.paa"; attendant = 1; scope = 2; destrType = "DestructNo"; meSound = ""; accuracy = 0.200000; mapSize = 1; }; }; First you need to define from which class your addon inherits from. Usually take something that is nearest similar to your object. As i see it is a security cam, so maybe class radio (object radio, not sounds ingame is meant here) or class TVset might fit. So replace <insert base class here> with the parent class you choose. And of course replace my_object with a classname you see it will fit, DB_sec_cam maybe. And last problem (which solved itself now), your original code had one closing curled bracket too much at the end. Share this post Link to post Share on other sites
DevilBass 0 Posted December 27, 2009 (edited) danm! so fast! yeah i convert .bin to .cpp, because am to noob to write mine lol , omg! i see, so if you convert bin to cpp, you lost much importants things, wow! unbelivable, well i dont have choice to restart learn scripting things, am good with other things but this, am so noob. thanks to help me, very appreciate, there some chocolate cookies for you :rolleyes: Edited December 27, 2009 by DevilBass Share this post Link to post Share on other sites
hamis 0 Posted December 29, 2009 Why you don't use Eliteness or Cpbo for converting to cpp? Share this post Link to post Share on other sites
[frl]myke 14 Posted December 29, 2009 @DevilBass We all use the BIS configs as templates and source for our own adapted code. Where else should we start with if not with "recycling" BIS code? I'm used with armaunbin and it is the only bug it has. Try those what hamis is proposing, although i thought cpbo does only unpack .pbo files...at least it does for me. And maybe you should install Notepad++ if you're doin configs and scripts more regulary, it will help you to keep your code in a readable way. Look for ArmA/ArmA2 Notepad++ plugin for synthax highlighting. For configs set Notepad++ to C++ language. It's really worth to give it a try. Share this post Link to post Share on other sites
hamis 0 Posted December 30, 2009 Cpbo does packing too,very easily.Just right click the folder and select "create pbo". Share this post Link to post Share on other sites