Wieder der gleiche fehlercode
Beiträge von McJoker
-
-
-
@n0pe : Wenn es kein 'createFactionVehicle' gibt, wie kann ich die Funktion so schreiben, dass es funktioniert ?
@Matze Gam1ngTv : Hab es eingetragen der selbe Fehlercode.
-
wie soll man das denn anders verfassen?
-
Hab das jetzt vollständig geändert, das ist aber nicht der Fehler.
.../bloods_vehicles.lua:6:attempt to call global 'createFactionVehicle' (a nil value)
immernoch.
-
Lua
Alles anzeigenlocal r,g,b = 254,0,0 local bloodscars = { createFactionVehicle ( 522, -1939.4000244141, -1041.9000244141, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14 ), --Bike createFactionVehicle ( 522, -1939.4000244141, -1045.5, 31.799999237061, 0, 0, 0, 14, 3, 0, 8, 9), --Bike createFactionVehicle ( 522, -1939.4000244141, -1049.5, 31.799999237061, 0, 0, 0, 14, 3, 0, 8, 9), --Bike createFactionVehicle ( 522, -1939.4000244141, -1053.3000488281, 31.799999237061, 0, 0, 0, 14, 3, 0, 8, 9), --Bike createFactionVehicle ( 522, -1939.4000244141, -1056.6999511719, 31.799999237061, 0, 0, 0, 14, 3, 0, 8, 9), --Bike createFactionVehicle ( 522, -1938, -1061.4000244141, 31.799999237061, 0, 0, 0, 14, 3, 0, 8, 9), --Bike createFactionVehicle ( 470, -1949.1999511719, -1085.5999755859, 30.89999961853, 0, 0, 0,14, 3, 0, 8, 9),--Patriot createFactionVehicle ( 470, -1942.1999511719, -1085.8000488281, 30.89999961853, 0, 0, 0, 14, 3, 0, 8, 9), --Patriot createFactionVehicle ( 495, -1952, -1048.3000488281, 32.700000762939, 0, 0, 0, 14, 3, 0, 8, 9), --Sandking createFactionVehicle ( 495, -1952, -1054.9000244141, 32.700000762939, 0, 0, 0, 14, 3, 0, 8, 9 ), --Sandking createFactionVehicle ( 482, -1952.3000488281, -1040.0999755859, 32.400001525879, 0, 0, 0, 14, 3, 0, 8, 9), --Burrito createFactionVehicle ( 482, -1952.3000488281,-1033.4000244141, 32.400001525879, 0, 0, 0, 14, 3, 0, 8, 9), --Burrito createFactionVehicle ( 482, -1952.3000488281, -1026.3000488281, 32.400001525879, 0, 0,0, 14, 3, 0, 8, 9), --Burrito createFactionVehicle ( 424, -1942.8000488281, -1042, 32, 0, 0, 0, 14, 3, 0, 8, 9), --BF-Injection createFactionVehicle ( 504, -1949.9000244141, -1061, 31.799999237061, 0, 0, 0, 14, 3, 0, 8, 9 ), --Bloodring Banger createFactionVehicle ( 489, -1938.9000244141, -1029.9000244141, 32.5, 0, 0, 0, 14, 3, 0, 8, 9 ), --Rancher createFactionVehicle ( 489, -1938.8000488281, -1023, 32.5, 0, 0, 0, 14, 3, 0, 8, 9), --Rancher createFactionVehicle ( 489, -1939.6999511719, -1037.8000488281, 32.5, 0, 0, 0, 14, 3, 0, 8, 9), --Rancher createFactionVehicle ( 487, -1946, -1049.1999511719, 53.599998474121, 0, 0, 0, 14, 3, 0, 8, 9 ), --Maverick createFactionVehicle ( 447, -1961.6999511719, -1048.6999511719, 53.400001525879, 0, 0, 0, 14, 3, 0, 8, 9 ) --Seasparrow } for i=1, #bloodscars do setVehicleColor ( bloodscars[i], 254, 0, 0 ) end
Hab es jetzt soweit gemacht, trotzdem zeigt der Debugscript den gleichen Errorcode an: Noch ein Fehler: bloods_vehicles.lua:6:attempt to call global 'createFactionVehicle' (a nil value)
Die Autos spawnen auch nicht.
-
Erstell eine Tabelle und füg da die Fahrzeuge ein
Bloodcars = {}
Bloodcars[1] = createFactionVehicle(.....)
...
...Und mach am besten dieses "Bloods" weg und nutze setVehiclePlateText in deiner for-schleife
https://wiki.multitheftauto.com/wiki/SetVehiclePlateText
Edit:
Kannst das eigentlich mit den Nummernschildern lassen, da Ultimate die Nummernschilder der Fraktionen automatisch mit dem Namen der Fraktion überschreibt
Das habe ich eigentlich schon gemacht
-
Code
Alles anzeigenlocal r,g,b = 254,0,0 local bloodscars = { createFactionVehicle ( 522, -1939.4000244141, -1041.9000244141, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Bike createFactionVehicle ( 522, -1939.4000244141, -1045.5, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Bike createFactionVehicle ( 522, -1939.4000244141, -1049.5, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Bike createFactionVehicle ( 522, -1939.4000244141, -1053.3000488281, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Bike createFactionVehicle ( 522, -1939.4000244141, -1056.6999511719, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0), --Bike createFactionVehicle ( 522, -1938, -1061.4000244141, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0) ,--Bike createFactionVehicle ( 522, -1938, -1064.8000488281, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Bike createFactionVehicle ( 470, -1949.1999511719, -1085.5999755859, 30.89999961853, 0, 0, 0,17, 3, 0, 8, 9, 14, 0, 0, 0, 0),--Patriot createFactionVehicle ( 470, -1942.1999511719, -1085.8000488281, 30.89999961853, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Patriot createFactionVehicle ( 495, -1952, -1048.3000488281, 32.700000762939, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Sandking createFactionVehicle ( 495, -1952, -1054.9000244141, 32.700000762939, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Sandking createFactionVehicle ( 482, -1952.3000488281, -1040.0999755859, 32.400001525879, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Burrito createFactionVehicle ( 482, -1952.3000488281,-1033.4000244141, 32.400001525879, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Burrito createFactionVehicle ( 482, -1952.3000488281, -1026.3000488281, 32.400001525879, 0, 0,0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Burrito createFactionVehicle ( 424, -1942.8000488281, -1042, 32, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --BF-Injection createFactionVehicle ( 504, -1949.9000244141, -1061, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Bloodring Banger createFactionVehicle ( 489, -1938.9000244141, -1029.9000244141, 32.5, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Rancher createFactionVehicle ( 489, -1938.8000488281, -1023, 32.5, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Rancher createFactionVehicle ( 489, -1939.6999511719, -1037.8000488281, 32.5, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Rancher createFactionVehicle ( 487, -1946, -1049.1999511719, 53.599998474121, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ), --Maverick createFactionVehicle ( 447, -1961.6999511719, -1048.6999511719, 53.400001525879, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0 ) --Seasparrow } for i=1, #bloodscars do setVehicleColor ( bloodscars[i], 254, 0, 0 ) end
Noch ein Fehler: bloods_vehicles.lua:6:attempt to call global 'createFactionVehicle' (a nil value) (der selbe wie vorher)
-
Lua: bloods_vehicles
Alles anzeigenlocal r,g,b = 254,0,0 local bloodscars = { createFactionVehicle ( 522, -1939.4000244141, -1041.9000244141, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --Bike createFactionVehicle ( 522, -1939.4000244141, -1045.5, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --Bike createFactionVehicle ( 522, -1939.4000244141, -1049.5, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --Bike createFactionVehicle ( 522, -1939.4000244141, -1053.3000488281, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --Bike createFactionVehicle ( 522, -1939.4000244141, -1056.6999511719, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --Bike createFactionVehicle ( 522, -1938, -1061.4000244141, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS") ,--Bike createFactionVehicle ( 522, -1938, -1064.8000488281, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --Bike createFactionVehicle ( 470, -1949.1999511719, -1085.5999755859, 30.89999961853, 0, 0, 0,17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"),--Patriot createFactionVehicle ( 470, -1942.1999511719, -1085.8000488281, 30.89999961853, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --Patriot createFactionVehicle ( 495, -1952, -1048.3000488281, 32.700000762939, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --Sandking createFactionVehicle ( 495, -1952, -1054.9000244141, 32.700000762939, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --Sandking createFactionVehicle ( 482, -1952.3000488281, -1040.0999755859, 32.400001525879, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --Burrito createFactionVehicle ( 482, -1952.3000488281,-1033.4000244141, 32.400001525879, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --Burrito createFactionVehicle ( 482, -1952.3000488281, -1026.3000488281, 32.400001525879, 0, 0,0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --Burrito createFactionVehicle ( 424, -1942.8000488281, -1042, 32, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --BF-Injection createFactionVehicle ( 504, -1949.9000244141, -1061, 31.799999237061, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "Bloods"), --Bloodring Banger createFactionVehicle ( 489, -1938.9000244141, -1029.9000244141, 32.5, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --Rancher createFactionVehicle ( 489, -1938.8000488281, -1023, 32.5, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS"), --Rancher createFactionVehicle ( 489, -1939.6999511719, -1037.8000488281, 32.5, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "Bloods"), --Rancher createFactionVehicle ( 487, -1946, -1049.1999511719, 53.599998474121, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "Bloods"), --Maverick createFactionVehicle ( 447, -1961.6999511719, -1048.6999511719, 53.400001525879, 0, 0, 0, 17, 3, 0, 8, 9, 14, 0, 0, 0, 0, "BLOODS") --Seasparrow } for i=1, #bloodscars do setVehicleColor ( bloodscars[i], 254, 0, 0 ) end
Das Problem ist, dass die Autos nicht spawnen. Folgender Errorcode wird im Debugscript angezeigt: .../bloods_vehicles.lua:6:attempt to call global 'createFactionVehicle' (a nil value)
und
.../bloods_vehicles.lua:6: '}' expected to close '{' at line 5 near '='.Würde mich über schnelle Hilfe freuen