![]() |
GuiTextEditCtrl assigning and showing variables help
1 Attachment(s)
How do I make a gui text a string?
Where as client.intro = 5; Dev_Client_Var = "client.intro"; function Dev_Client_OK.onAction(){ (""@"player."@Dev_Client_Var.text) = 15; } I want player.client.intro = 15; But I can't seem to do it.. It either says 5, or 0.. I've been messing around with it... Not sure what to do. PHP Code:
player.client.intro = 15; instead it is basically doing 5 = 15... Which doesn't make sense. :p |
Have you tried something like this?
PHP Code:
|
You've set Dev_Client_Var to client.intro, so why are you doing Dev_Client_Var.text?
PHP Code:
Wait, is Dev_Client_Var a GUI text ctrl? PHP Code:
|
Quote:
You input the variable name in the left input i.e.: "client.intro" then in the right input you would put in the number or array i.e.: 5 or {6,4,2} or "testing"... |
Quote:
|
Visual Example
If no one can understand this, I don't know what people will.
I tried to have it just equal 15 (so I really didn't have to keep typing it) This should show visually what I'm trying to do. Input1 assigns Input2 to itself. PHP Code:
Later I'll have to do: if (input1 == null){ return; } So that if there is no such thing as client.intro, it wouldn't do anything. I've tried this too: PHP Code:
"@obj.newVar: player.client.intro should be 15", then "In reality it is: 5" since my client.intro is 5 and hasn't changed. |
I don't really understand but I think you could just do for the input null part:
PHP Code:
|
Quote:
someone might put client.peanuts = 12 in the input.. Well if the variable 'peanuts' does not exist, it probably shouldn't be used lol... So it will still have an input but that isn't the question right now but is for the second part, thank you for attempting to help!! Not quite what I was going for though. I might have to have it search through the clients current strings/variables that exist... |
You're looking for makevar. Avoid using 'var' by itself as a variable name.
I.e. PHP Code:
PHP Code:
|
I need to spread rep before I positive rep you again. Thank you so freaking much.
I don't think the problem was exactly others couldn't understand it, I think they just couldn't do it therefor not comprehending what was supposed to be done. The video it self should have explained it... regardless you've done it! |
| All times are GMT +2. The time now is 07:03 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.