HeavyMetal Posted February 10, 2013 Author Share Posted February 10, 2013 [2013-02-10 00:28:34] Stopping garage_project [2013-02-10 00:28:34] Dropping DB table vehiclesaverb [2013-02-10 00:28:34] ERROR: garage_project\garagesave.lua:46: attempt to concatenate global 'Dimension' (a nil value) Link to comment
Castillo Posted February 10, 2013 Share Posted February 10, 2013 You are not using the latest script I posted? that one worked fine for me. @50p: His variables are "interior" and "dimension". Link to comment
50p Posted February 10, 2013 Share Posted February 10, 2013 You are not using the latest script I posted? that one worked fine for me.@50p: His variables are "interior" and "dimension". I'm not using the script. I never test people's script either. I only test them after I don't see anything wrong with the code. I just looked at the mistakes he made and I quickly looked at local interior" but missed the "Interior" which I copied. @HeavyMetal, Dimension is not the same as dimension. Link to comment
HeavyMetal Posted February 10, 2013 Author Share Posted February 10, 2013 thanks! it is now working but only when the car is created on the dimension and interior, when it is changed from one to another it dont work, is there anything that need to be updated when the vehicle is changed from dimension or interior, or something to get the current dimension/interior? Link to comment
50p Posted February 10, 2013 Share Posted February 10, 2013 Isn't that what you're doing when you save your vehicles? getElementDimension and getElementInterior return their current dimension and interior respectively. Link to comment
HeavyMetal Posted February 10, 2013 Author Share Posted February 10, 2013 i know, but for some reason it is returning the dimension and interior the car was created, not its current one, example: if i create a car on dimension 0, interior 0 it will be saved on 0 0 , even if i take it to dimension and interior 1, but if i create it on interior and dimension 1 it works, only if i dont take it to the 0 again, because it will be saved on 1(where it was created), is there anyway to "update" the getElementByType? or something like this? Link to comment
50p Posted February 10, 2013 Share Posted February 10, 2013 Are you changing these client-side? Get in the car and run this code from admin panel: setElementDimension( getPedOccupiedVehicle( getPlayerFromName( "YOUR NICK" ) ), 2) Then this: getElementDimension( getPedOccupiedVehicle( getPlayerFromName( "YOUR NICK" ) ) ) Watch the chatbox and see if the second run will return 2. Link to comment
HeavyMetal Posted February 10, 2013 Author Share Posted February 10, 2013 im running it server side because the sql table commands are server side, it worked, it said true, and them 2 in the second test Link to comment
HeavyMetal Posted February 10, 2013 Author Share Posted February 10, 2013 i found the problem,it was the marker,it was using the "OnClientMarkerHit", so it was not setting the interior and dimension on a way the server could recognize (i guess), well, so i changed to "OnMarkerHit" and now im running it server side, now everything is working! thanks ! i learned a lot with you guys doing this script! i hope this topic helps more people with this problem! thanks very much for all the help Link to comment
50p Posted February 10, 2013 Share Posted February 10, 2013 i found the problem,it was the marker,it was using the "OnClientMarkerHit", so it was not setting the interior and dimension on a way the server could recognize (i guess), well, so i changed to "OnMarkerHit" and now im running it server side, now everything is working!thanks ! i learned a lot with you guys doing this script! i hope this topic helps more people with this problem! thanks very much for all the help Do server-side scripting as much as possible. Only do UI based scripts client-side this way your script is safer, clients don't have to download as much and last but not least everything is synced. Good luck. 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