toptional Posted March 14, 2013 Share Posted March 14, 2013 Got a bit of a problem ] marker1 = createMarker ( 215.77626, 1826.16956, 5.41406, "cylinder", 1.2, 0, 0, 255, 255 ) addEventHandler ( "onClientRender", root, drawingFunction ) addEventHandler("onClientMarkerHit", marker1, function drawingFunction() GWindow1 = guiCreateWindow(426, 183, 407, 363, "Join the Brotherhood", false) guiWindowSetSizable(GWindow1, false) showCursor (true) guiCreateStaticImage( 475, 240, 300, 140, "actest.png", false ) dxDrawText("Welcome, Click Join if you would like to join the Roman Brotherhood, it is your choice to choose your Brotherhood, to choose the path and follow the creed, This is Assassins Creed on MTA.", 458, 366, 806, 509, tocolor(255, 255, 255, 255), 1, "default", "left", "top", false, true, true) end ) I'm getting this error WARNING: loading script failed AC\client.lua:28 '(' expected near 'DrawingFunction' Help please. Link to comment
Renkon Posted March 14, 2013 Share Posted March 14, 2013 Functions inside event handlers CANNOT have a name, so remove drawingFunction. Link to comment
DNL291 Posted March 14, 2013 Share Posted March 14, 2013 (edited) marker1 = createMarker ( 215.77626, 1826.16956, 5.41406, "cylinder", 1.2, 0, 0, 255, 255 ) function drawingFunction() GWindow1 = guiCreateWindow(426, 183, 407, 363, "Join the Brotherhood", false) guiWindowSetSizable(GWindow1, false) showCursor (true) guiCreateStaticImage( 475, 240, 300, 140, "actest.png", false ) dxDrawText("Welcome, Click Join if you would like to join the Roman Brotherhood, it is your choice to choose your Brotherhood, to choose the path and follow the creed, This is Assassins Creed on MTA.", 458, 366, 806, 509, tocolor(255, 255, 255, 255), 1, "default", "left", "top", false, true, true) end addEventHandler("onClientMarkerHit", marker1, function(hitElement) addEventHandler( "onClientRender", root, drawingFunction ) end ) Edited March 14, 2013 by Guest Link to comment
toptional Posted March 14, 2013 Author Share Posted March 14, 2013 Thanks! It worked Never knew that Link to comment
DNL291 Posted March 14, 2013 Share Posted March 14, 2013 Thanks! It workedNever knew that Create the window and image out of the "onClientRender" event. Link to comment
toptional Posted March 14, 2013 Author Share Posted March 14, 2013 Thanks! It workedNever knew that Create the window and image out of the "onClientRender" event. Yours completely didn't work. Link to comment
DNL291 Posted March 14, 2013 Share Posted March 14, 2013 Thanks! It workedNever knew that Create the window and image out of the "onClientRender" event. Yours completely didn't work. I'm not saying that my code works. It was made by you, i just edited. Create the window and image out of the "onClientRender" event. Link to comment
toptional Posted March 14, 2013 Author Share Posted March 14, 2013 Functions inside event handlers CANNOT have a name, so remove drawingFunction. I got it working from Renkon's Help, Thanks renkon. Link to comment
DNL291 Posted March 14, 2013 Share Posted March 14, 2013 Next time don't be arrogant with people. Go ahead, create the window in the "onClientRender" event. I'm here to help you, not to discuss. Link to comment
toptional Posted March 14, 2013 Author Share Posted March 14, 2013 Oh! I got the wrong impression, I was completely mistaken My thought. Your right the dxtext was completely messed up and the window. dx is really an ass. Thanks anyway. 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