![]() |
variable values in string names
Why won't this work? The trigger and parameter is being received fine, it's just not writing it in to the player's strings right:
PHP Code:
|
|
And also, you might want to improve your styling..
|
Also is it possible to add strings, like in C++ client.string1 may be 'hel' and client.string2 is 'lo' and client.string1+client.string2='hello'?
|
client.string1 = "hel";
client.string2 = "lo"; player.chat = client.string1 @ client.string2; Thats what @ is. It appends two strings together. |
Well, I'm trying this, Shouldn't this work?
PHP Code:
|
You don't need parenthasis on the outside of the value.
NPC Code: that would work. |
What the hell, Hachi? It doesnt matter if he has 100 parentheses as long as he closes them up on the other side.
client.e_mail_messages=(((((client.e_mail_messages @ " Message: " @ client.("e_mail_" @ this.i)))))); would do the same thing as client.e_mail_messages=client.e_mail_messages @ " Message: " @ client.("e_mail_" @ this.i); To the author, what exactly are you trying to do? if client.e_mail_messages is a string list and you want to add to it use client.e_mail_messages.add(" Message: " @ client.("e_mail_" @ this.i)); so, it will add to the actual list rather than appending to the end of the last thing in the list. |
Quote:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
1 Attachment(s)
Well, currently, I have a few problems. First, the quotes around all the variables, second word wrap isn't working, and finally, the "none" string for an empty message space isn't being read.
Test for none: for(this.i=0;this.i<26;this.i++) { if(!client.("email_"@this.i)=="none") { client.email_messages.add(" Message: " @ client.("email_" @ this.i)); } } Screen shot of problem is below: |
Quote:
|
XD Still, the "" confuse me, since they seem to be comming out of no where, ad not all the strings have extra ""
|
Quote:
PHP Code:
PHP Code:
|
Is it possible to inturupt this list to make it a vertical list?
ex: Message: "hey", Message "whatever", etc |
Uh..
NPC Code: I dont really get what you need help with.. |
it's for displaying the string in the gui, I want it to seperate, so that each new message is on a sepperate line
|
If you use a GuiMLTextCtrl you can do:
NPC Code: and to add text.. NPC Code: |
Quote:
|
To add to an array
obj.add("lols"); to delete obj.remove("lols"); <--Must be inside the array to display message( format("%s is the first index of the array", obj[0]) ); normally, you get left over "" for some reason, it's best to trim the obj temp.trimmedaccount = player.account.trim(); obj.add( temp.trimmedaccount ); Infact, read this http://wiki.graal.net/index.php/Crea...ject_functions |
| All times are GMT +2. The time now is 03:08 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.