Jump to content

Vehicles


Recommended Posts

Posted

error : SAEGVehicles/vehicles/vehicles_s.lua 355 : bad argument to 'gsub' (string expected, got nill)

error :SAEGPhone/apps/vehicles_server.lua:19:call: failed to call 'SAEGVehicles:sellvehicle |string '?|

code :

addEvent ( "SAEGPhone:App->Vehicles:onPanelOpened", true ) 
addEventHandler ( "SAEGPhone:App->Vehicles:onPanelOpened", root, function ( )  
    local cars = exports.SAEGVehicles:getAccountVehicles ( getAccountName ( getPlayerAccount ( source ) ) ) 
    triggerClientEvent ( source, "SAEGPhone:App->Vehicles:onClientGetVehicles", source, cars ) 
end ) 
  
addEvent ( "SAEGPhone:Apps->Vehicles:SetVehicleVisible", true ) 
addEventHandler ( "SAEGPhone:Apps->Vehicles:SetVehicleVisible", root, function ( id, stat )  
    local v = exports.SAEGVehicles:SetVehicleVisible ( id, stat, source ) 
end ) 
  
addEvent ( "SAEGPhone:Apps->Vehicles:AttemptRecoveryOnID", true ) 
addEventHandler ( "SAEGPhone:Apps->Vehicles:AttemptRecoveryOnID", root, function ( id ) 
    exports.SAEGVehicles:recoverVehicle ( source, id ) 
end )  
  
addEvent ( "SAEGPhone:App->Vehicles:sellPlayerVehicle", true ) 
addEventHandler ( "SAEGPhone:App->Vehicles:sellPlayerVehicle", root, function ( plr, data ) 
    exports.SAEGVehicles:sellVehicle ( plr, data ) 
end ) 
  
addEvent ( "SAEGPhone:Apps->Vehicles:WarpThisVehicleToMe", true ) 
addEventHandler ( "SAEGPhone:Apps->Vehicles:WarpThisVehicleToMe", root, function ( id ) 
    if ( not exports.SAEGVehicles:warpVehicleToPlayer ( id, source ) ) then 
        exports.SAEGMessages:sendClientMessage ( "Error: Unable to warp vehicle", source, 255, 0, 0 ) 
    end 
end ) 

Posted

Your error is not in the code you provided. Give us the code to function "sellVehicle" in resource SAEGVehicles.

And show the code where line 355 is, in your server side code "vehicles_s.lua"

Else I don't know how to help.

And now Aurora is back again, pm for more info.

Ex. Lead dev & L6 Staff at AUR, NGC, MTA RP & SAA.

Ex. Developer at Community of Social Gamers - CSG

Ex Founder of International Gaming Community - IGC and Union of Individual Players- UIP

9o6E8.png Ab-47

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...