Da im LA Script Thread nicht viel leute aktiv sind wollte ich euch Fragen wie ich den matstruck entbuggt bekomme ich bekomme immer diese Error meldung wenn ich ihn abgeben möchte ( er verschwindet auch nicht) : ERROR: la_reallife/fraktionen/compton/compton_deliver.lua:27: attempt to perform arithmetic on global 'DepotMaterials' (a nil value
Hier die Lua:
Spoiler anzeigen
Lua
function ComptonDeliver_func ( player, dim )if isCompton (player) then local veh = getPedOccupiedVehicle ( player ) if veh then if getPedOccupiedVehicleSeat ( player ) == 0 then if getElementModel ( veh ) == 609 then if laGetElementData ( veh, "matstruck" ) == 1 then local mats = laGetElementData ( veh, "mats" ) local kosten = laGetElementData ( veh, "kosten" ) ComptonMats = tonumber ( MySQL_GetString("fraktionen", "DepotMaterials", "Name LIKE 'Compton'") ) ComptonFamkasse = tonumber ( MySQL_GetString("fraktionen", "DepotGeld", "Name LIKE 'Compton'") ) local Fammatsneu = ComptonMats + mats local ComptonFamkasseNew = ComptonFamkasse - kosten MySQL_SetString("fraktionen", "DepotMaterials", Fammatsneu, "Name LIKE 'Compton'") MySQL_SetString("fraktionen", "DepotGeld", ComptonFamkasseNew, "Name LIKE 'Compton'") ComptonMats = tonumber ( MySQL_GetString("fraktionen", "DepotMaterials", "Name LIKE 'Compton'") ) ComptonFamkasse = tonumber ( MySQL_GetString("fraktionen", "DepotGeld", "Name LIKE 'Compton'") ) outputChatBox ( "Matslieferung abgegeben. Du erhältst "..kosten.."$ aus der Fraktionskasse zurück!", player, 0, 200, 0 ) local msg = "[MATSTRUCK]: Der Matstruck wurde erfolgreich abgegeben!" sendMSGForFaction ( msg, 1, 200, 0, 0 ) sendMSGForFaction ( msg, 2, 200, 200, 0 ) sendMSGForFaction ( msg, 3, 200, 200, 0 ) sendMSGForFaction ( msg, 6, 200, 0, 0 ) sendMSGForFaction ( msg, 7, 200, 200, 0 ) sendMSGForFaction ( msg, 8, 200, 0, 0 ) sendMSGForFaction ( msg, 9, 0, 150, 0 ) sendMSGForFaction ( msg, 10, 200, 200, 0 ) outputLog ( "[MATSTRUCK]: "..getPlayerName ( player ).." hat bei den Comptons einen Matstruck fuer "..kosten.."$ abgegeben!", "bad" ) laSetElementData ( player, "money", laGetElementData ( player, "money" ) + kosten ) givePlayerMoney ( player, kosten ) setElementVisibleTo ( ComptonDeliver, player, false ) setElementVisibleTo ( ComptonDeliverBlip, player, false ) triggerClientEvent ( player, "HudEinblendenMoney", getRootElement() ) removePedFromVehicle ( player ) removePedFromVehicle ( getVehicleOccupant ( veh, 1 ) ) setElementPosition ( veh, 0, 0, -500 ) destroyElement ( veh ) setTimer(matsclean, 3600000, 1) [/spoiler]