Jump to content

guiGetText


Recommended Posts

Hi Guys!

I have a problem.

I use the edit box.

I use this code:

if type (moneyBox) == "number" then 

Im write the number on editbox but it's say "Yukariya lutfen sadece sayi giriniz..!".

27RgBj.png

Where is the mistake?

Code Removed 

Edited by Guest
Link to comment

Ok the problem is as I suspected:

local moneyBox = guiGetText ( editBox ) 
local para = getPlayerMoney(source) 

Are executed before:

editBox = guiCreateEdit(182, 55, 102, 23, "0", false, kumarWindow) 
guiEditSetMaxLength(editBox, 2) 

To solve this replace line 39 and 40 with this block:

editBox = guiCreateEdit(182, 55, 102, 23, "0", false, kumarWindow) 
guiEditSetMaxLength(editBox, 2) 
moneyBox = guiGetText ( editBox ) 
para = getPlayerMoney(source) 

The script will execute from up and then downwards, after that it will run the event triggers including "onClientResourceStart", anything that isn't inside an event handler function will be executed before the resource or player join events.

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