Chronic Posted October 29, 2013 Posted October 29, 2013 (edited) When I go in theMarker3, nothing happens, I'm really confused on what I did wrong. function marker ( thePlayer ) theMarker3 = createMarker ( 497.24795532227,-75.805885314941,997.5578125, "cylinder", 1, 255, 105, 180, 170 ) setElementInterior ( theMarker3, 11 ) addEventHandler ( "onMarkerHit", theMarker3, drinks ) end addEventHandler ( "onResourceStart", resourceRoot, marker ) function drinks ( thePlayer ) outputChatBox ( "test" ) end The marker spawns fine, but nothing happens when I enter it. Edited October 29, 2013 by Guest
Renkon Posted October 29, 2013 Posted October 29, 2013 The code is very messy. As to make it clearer and easier-to-understand I'd made some modifications. Try this, I just removed the MARKER function as whenever a resource is started, the server reads everything so its not so needed (the onResourceStart event, I mean). Btw, your mistake is that DRINKS function is below the eventHandler, which will mean, when the eventHandler is created, drinks function will not exist as it wasn't read yet, so easier would be: theMarker3 = createMarker ( 497.24795532227,-75.805885314941,997.5578125, "cylinder", 1, 255, 105, 180, 170 ) setElementInterior ( theMarker3, 11 ) setElementInterior ( theMarker3, 11 ) function drinks(thePlayer) outputChatBox("tits") end addEventHandler ( "onMarkerHit", theMarker3, drinks ) Be sure to use debugscript 3 in order to see any mistake (you'd have realized an error would have been shown
Chronic Posted October 29, 2013 Author Posted October 29, 2013 You put setElementInterior twice However, still doesn't work.
Renkon Posted October 29, 2013 Posted October 29, 2013 Be sure to use debugscript 3 in order to see any mistake (you'd have realized an error would have been shown
xXMADEXx Posted October 29, 2013 Posted October 29, 2013 You put setElementInterior twice However, still doesn't work. Is this you entire code? The error could be somewhere else.
xXMADEXx Posted October 29, 2013 Posted October 29, 2013 chat doesn't output anything Is this client or server side?
Chronic Posted October 29, 2013 Author Posted October 29, 2013 server, obviously. And yes, it's my entire code
Chronic Posted October 29, 2013 Author Posted October 29, 2013 Problem solved, the marker was too small
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