xXMADEXx Posted April 7, 2013 Share Posted April 7, 2013 Im making vehicle spawners, but for some reason getting the gang is failing... I don't know why. Error: ERROR: call: failed to call "[ROG]Groups:getPlayerGang" [string "?"] Code: addEventHandler("onMarkerHit",marker, function (p) local getGang = exports['[ROG]Groups']:getPlayerGang(p) if (getGang==group) then triggerClientEvent(p,"showGroupVehicleSpawners",p,cars) else triggerClientEvent(p,"message:centerText",p,"Your not in "..group, 3, 255, 0, 0) end end ) -- This is what i use to create the spawner: addGroupSpawner({1319.1091308594, -2584.6645507813, 13.5390625, -90}, {411, 412}, {120, 0, 255}, "Military") Link to comment
alcholistu Posted April 7, 2013 Share Posted April 7, 2013 triggerClientEvent(p,"message:centerText",p,"Your not in "..group, 3, 255, 0, 0) ..group should be ..group.. Link to comment
TAPL Posted April 7, 2013 Share Posted April 7, 2013 The resource "[ROG]Groups" is not started. Link to comment
..:D&G:.. Posted April 7, 2013 Share Posted April 7, 2013 triggerClientEvent(p,"message:centerText",p,"Your not in "..group, 3, 255, 0, 0)..group should be ..group.. Not really, because there is a comma ( , ) at the end of ..group, if there would be other quotation, for example: "Your not in "..group.."so you can't use this command.", 3, 255, 0, 0) Then yes, at the end of 'group' should be 2 dots, but not in this case Link to comment
xXMADEXx Posted April 7, 2013 Author Share Posted April 7, 2013 triggerClientEvent(p,"message:centerText",p,"Your not in "..group, 3, 255, 0, 0)..group should be ..group.. No, because "..group is the last thing, but if i was going to be that way, i would have to do "Your not in "..group..'!" Link to comment
xXMADEXx Posted April 7, 2013 Author Share Posted April 7, 2013 The resource "[ROG]Groups" is not started. yes, it is. Link to comment
Castillo Posted April 7, 2013 Share Posted April 7, 2013 Make sure the function is exported on the meta.xml of "[ROG]Groups". Link to comment
xXMADEXx Posted April 8, 2013 Author Share Posted April 8, 2013 Make sure the function is exported on the meta.xml of "[ROG]Groups". Yea, it is. I use that "if" statment in my gate scripts, and it works fine, i really have no idea why it won't work in this one... Here is the export: <export function="getPlayerGang" type="server" /> <!-- Arguments: thePlayer. Returns: The gang. --> 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