Jump to content

Whats wrong o.o?


Lord_of_VW

Recommended Posts

function clicks ( )

helpbutton = guiCreateButton(337,9,38,41,"?",false)

infobutton = guiCreateButton(338,83,38,41,"Info",false)

addEventHandler ( "onClientGUIClick", helpbutton, help )

addEventHandler ( "onClientGUIClick", infobutton, info )

end

function help ( )

helpwindow = guiCreateWindow(649,232,388,513,"Help",false)

guiWindowSetMovable(helpwindow,false)

guiWindowSetSizable(helpwindow,false)

buttonclosehelp = guiCreateButton(0.0335,0.9376,0.9356,0.0448,"Close",true,helpwindow)

memohelp = guiCreateMemo(0.0232,0.0429,0.9536,0.8791,"fdgsdfg\",true,helpwindow)

guiSetAlpha(memohelp,0.5)

guiMemoSetReadOnly(memohelp,true)

addEventHandler ( "onClientGUIClick", buttonclosehelp, guiExitHelp )

end

function info ( )

infowindow = guiCreateWindow(649,232,388,513,"Info",false)

guiWindowSetMovable(infowindow,false)

guiWindowSetSizable(infowindow,false)

buttoncloseinfo = guiCreateButton(0.0335,0.9376,0.9356,0.0448,"Close",true,infowindow)

memoinfo = guiCreateMemo(0.0232,0.0429,0.9536,0.8791,"fdgsdfg\",true,infowindow)

guiSetAlpha(memoinfo,0.5)

guiMemoSetReadOnly(memoinfo,true)

addEventHandler ( "onClientGUIClick", buttoncloseinfo, guiExitInfo )

end

function guiExitHelp ( button )

guiSetVisible (help, false )

showCursor ( false )

end

function guiExitInfo ( button )

guiSetVisible (help, false )

showCursor ( false )

end

addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ), clicks )

Whats wrong ?? Crusors are made thats no problem ... but whats wrong at this Client-Side script

Link to comment

- pastebin.com

- use TAB to make the code readable

function hello( ) 
    -- this is how your code should look like 
    -- otherwise it's difficult to read 
    return "hello world"; 
end 

- give more info, what's not working, what errors you get (if any), what it should do, etc.

Link to comment
function clicks ( ) 
helpbutton = guiCreateButton(337,9,38,41,"?",false) 
  
infobutton = guiCreateButton(338,83,38,41,"Info",false) 
  
addEventHandler ( "onClientGUIClick", helpbutton, help ) 
addEventHandler ( "onClientGUIClick", infobutton, info ) 
end 
  
function help ( ) 
helpwindow = guiCreateWindow(649,232,388,513,"Help",false) 
guiWindowSetMovable(helpwindow,false) 
guiWindowSetSizable(helpwindow,false) 
  
buttonclosehelp = guiCreateButton(0.0335,0.9376,0.9356,0.0448,"Close",true,helpwindow) 
memohelp = guiCreateMemo(0.0232,0.0429,0.9536,0.8791,"fdgsdfg\",true,helpwindow) 
guiSetAlpha(memohelp,0.5) 
guiMemoSetReadOnly(memohelp,true) 
  
addEventHandler ( "onClientGUIClick", buttonclosehelp, guiExitHelp ) 
end 
function info ( ) 
infowindow = guiCreateWindow(649,232,388,513,"Info",false) 
guiWindowSetMovable(infowindow,false) 
guiWindowSetSizable(infowindow,false) 
  
buttoncloseinfo = guiCreateButton(0.0335,0.9376,0.9356,0.0448,"Close",true,infowindow) 
memoinfo = guiCreateMemo(0.0232,0.0429,0.9536,0.8791,"fdgsdfg\",true,infowindow) 
guiSetAlpha(memoinfo,0.5) 
guiMemoSetReadOnly(memoinfo,true) 
  
addEventHandler ( "onClientGUIClick", buttoncloseinfo, guiExitInfo ) 
end 
  
function guiExitHelp ( button ) 
guiSetVisible (help, false ) 
showCursor ( false ) 
end 
function guiExitInfo ( button ) 
guiSetVisible (help, false ) 
showCursor ( false ) 
end 
addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ), clicks ) 

Link to comment

You must have got error message(s)! Use a command to open debug window (while being logged in as admin): /debugscript 3

I said indent your code! It's hard to find what's wrong in the code for us (not mention you ¬¬)... I can see you try to escape " (double quotation) and you don't have another " to end the string.

Use \ in string to escape characters.

memohelp = guiCreateMemo(0.0232,0.0429,0.9536,0.8791,"fdgsdfg\",true,helpwindow) --THIS IS WRONG 
  
 

Use Notepad++ to see if the string is correct. As you can see here, the red colour tells you that string is not ended with "

memohelp = guiCreateMemo(0.0232,0.0429,0.9536,0.8791,"fdgsdfg\"",true,helpwindow)-- THIS IS CORRECT 

Link to comment

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...