Jump to content

What s this Bug


Scripting

Recommended Posts

Hi all,

I have a bug if i do this:

client-side:

name1 = guiCreateLabel(50,10,410,20,"test1",true) 
name2 = guiCreateLabel(50,25,410,20,"test2",true) 
money1 = guiCreateLabel(300,10,410,20,"20000",true) 
money2 = guiCreateLabel(300,25,410,20,"17000",true) 
function show () 
   local playerMoney = getPlayerMoney(getLocalPlayer()) 
   local name = getPlayerName(getLocalPlayer()) 
   if ( playerMoney >=  tonumber (guiGetText(money1)) ) then 
      guiSetText(name2,guiGetText(name1)) 
      guiSetText(name1,"The Name: ".. name) 
      guiSetText(money2,guiGetText(money1))         
      guiSetText(money1,"The Money: ".. PlayerMoney)      [This Change] 
end 
end 
   addEventHandler("onClientRender", getRootElement(), show) 

The Code work Correctly 100%;

and if I change this Code Argument :

guiSetText(money1,"The Money: ".. PlayerMoney)   

The Code work a bug: The Label(money1,mney2) change text to (playerMoney) and the Label(name1,name2) change text to (name).

Pls fix this bug set The Code work Correctly:

client-side:

name1 = guiCreateLabel(50,10,410,20,"test1",true) 
name2 = guiCreateLabel(50,25,410,20,"test2",true) 
money1 = guiCreateLabel(300,10,410,20,"20000",true) 
money2 = guiCreateLabel(300,25,410,20,"17000",true) 
function show () 
   local playerMoney = getPlayerMoney(getLocalPlayer()) 
   local name = getPlayerName(getLocalPlayer()) 
   if ( playerMoney >=  tonumber (guiGetText(money1)) ) then 
      guiSetText(name2,guiGetText(name1)) 
      guiSetText(name1,"The Name: ".. name) 
      guiSetText(money2,guiGetText(money1))         
      guiSetText(money1,playerMoney)      [This The Change Arguments ] 
end 
end 
   addEventHandler("onClientRender", getRootElement(), show) 

Link to post

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