Jump to content

Set text problem :(


ramzi

Recommended Posts

Posted

Hi guys,i have got this code over here,which sets a text down the screen,but it didnt work.

Error msg:

ERROR: version\text.lua:3: attempt to call global 'guiSetText' (a nil value)

lua code:

GUIEditor_Label = {} 
  
strona = guiSetText (260,571,349,19,"Forums coming soon.",false) 
guiSetAlpha(strona,1) 
guiLabelSetColor(strona,255, 0, 0) 
guiLabelSetVerticalAlign(strona,"top") 
guiLabelSetHorizontalAlign(strona,"left",false) 
  
GUIEditor_Label[1] = guiSetText (715,568,78,17,"DZ RPG V1.0",false) 
guiLabelSetColor(GUIEditor_Label[1],255,255,255) 
guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") 
guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) 

Posted

The text.lua script type is not set to client. Edit the meta.xml file and change the script type to 'client'.

guiSetText sets the text of an element, but it doesn't create the element. You need to replace it with guiCreateLabel.

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