dogidog Posted February 11, 2014 Share Posted February 11, 2014 Hey, i tried to translate ammo in the MTA Dayz gamemode but now i have spawn error. ERROR: [2014-02-11 23:39:53] ERROR: [DayZ-MTA]\DayZ\spawn.lua:393: attempt to perform arithmetic on a boolean value if data[1] == "Charg. M1911" then plusData = math.floor(getElementData(source,data[1])/7) elseif data[1] == "Charg. G17" then plusData = math.floor(getElementData(source,data[1])/15) elseif data[1] == "Charg. Deagle" then plusData = math.floor(getElementData(source,data[1])/7) elseif data[1] == "Charg. PDW" then plusData = math.floor(getElementData(source,data[1])/30) elseif data[1] == "Charg. MP5A5" then plusData = math.floor(getElementData(source,data[1])/20) elseif data[1] == "Charg. AK47" then plusData = math.floor(getElementData(source,data[1])/30) elseif data[1] == "Charg. M4A1" then plusData = math.floor(getElementData(source,data[1])/20) elseif data[1] == "Charg. M4A03" then plusData = math.floor(getElementData(source,data[1])/5) elseif data[1] == "Charg. Lee Enfield" then plusData = math.floor(getElementData(source,data[1])/10) elseif data[1] == "Carreaux explosifs" then plusData = math.floor(getElementData(source,data[1])/2) elseif data[1] == "Cart. Cal.12" then plusData = math.floor(getElementData(source,data[1])/7) elseif data[1] == "Cart. 2rnd" then plusData = math.floor(getElementData(source,data[1])/2) end When i die, i can't respawn and my body is duplicated and i fly in the air ... Please help me Link to comment
dogidog Posted February 14, 2014 Author Share Posted February 14, 2014 UP please i really need help to solve this problem Link to comment
Gallagher Posted February 14, 2014 Share Posted February 14, 2014 UPplease i really need help to solve this problem I recommend you leave the name as it was before, al renomialo try again Link to comment
dogidog Posted February 14, 2014 Author Share Posted February 14, 2014 Already tested and when i re name to original ammo name it work, but when i try to change it anymore i've spawn error Link to comment
cheez3d Posted February 14, 2014 Share Posted February 14, 2014 Search for the original ammo names everywhere else in the gamemode and replace all the occurrences. Link to comment
dogidog Posted February 14, 2014 Author Share Posted February 14, 2014 Search for the original ammo names everywhere else in the gamemode and replace all the occurrences. i opened all files with Notepad ++ and make a "find in all open files" Link to comment
Moderators Citizen Posted February 14, 2014 Moderators Share Posted February 14, 2014 Search for the original ammo names everywhere else in the gamemode and replace all the occurrences. i opened all files with Notepad ++ and make a "find in all open files" You should use the "search in folder" feature, and submit the path to the root folder of your MTA DayZ gamemode. Link to comment
dogidog Posted February 14, 2014 Author Share Posted February 14, 2014 Search for the original ammo names everywhere else in the gamemode and replace all the occurrences. i opened all files with Notepad ++ and make a "find in all open files" You should use the "search in folder" feature, and submit the path to the root folder of your MTA DayZ gamemode. ok i try this function of notepad ++ but all files found are the same which i edited. Ok je test cette fonction de notepad ++ mais les fichiers qui ont été trouvés sont les mêmes que j'ai auparavant édité ________________________________________________________________ EDIT : not working ... always the same error Link to comment
Moderators Citizen Posted February 14, 2014 Moderators Share Posted February 14, 2014 Can you paste here the path you gave to the search feature ? (I'm pretty sure I'll see a mistake in it) Link to comment
dogidog Posted February 15, 2014 Author Share Posted February 15, 2014 C:\Program Files (x86)\MTA San Andreas 1.3\server\mods\deathmatch\resources\[DayZ-MTA] Find : "M1911 Mag" Replace by : "Charg. M1911" Link to comment
Moderators Citizen Posted February 15, 2014 Moderators Share Posted February 15, 2014 Damn it, thought you wouldn't set "[DayZ-MTA]" folder as root folder for the search feature. Then hummm be sure you are checking the "Case sensitive" option and that the filder is "*.*" without quotes obviously. If it still doesn't work, then check the database, it's probably loading objects that the player has and there are some "M1911 Mag" somewhere in the database. If you still can't fix it, just set a default value if the getElementData function returns nil by doing like this: getElementData(source,data[1]) or 0 if the getElementData function returns nil then 0 will be used. So in your case, it will be like this: plusData = math.floor( (getElementData(source,data[1]) or 0)/7 ) Regards, Citizen Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now