EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > XML Modification Help & Info

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Unread 08-24-2010, 10:04 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default Executing commands with quotes

I've been trying to figure this one out for a while. I've been wanting to make my click to cast buttons support quotes without having to relog, but to no avail.

I'm not really sure where the code interpreter is screwing up though.
Think about this happening during runtime, not in code before the game is excuted, because that's not where the problems happen.

Method 1:
An input field is filled out and saved to a variable:
useability Lucan's Pact
So.... Abilities.cmd1 = useability Lucan's Pact

Now I want to take that command and stick it on a button so it can execute the command. So I make a physical button that when pressed pulls the correct code and puts it in another button and then presses that (so it can run the command). So inside Button1:
Parent.Button2.onpress = Parent.Abilities.cmd1
Parent.Button2.press = true


Press the button in-game, nothing happens.....
Change it to an ability WITHOUT an apostrophe and it works fine.

Method 2:
Okay, lets change the original text to Abilities.cmd1 = Lucan's Pact (so there's no more command in front of it)
And lets changed Button1 to:
useability Parent.Abilities.cmd1


Okay, that works perectly... But why can't method 1 work?!
Where is it failing to execute properly?

It should be reading: Button2.onpress="useability Lucan's Pact" within the game, but it's apparently not

Does anyone have any ideas?
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
  #2  
Unread 08-24-2010, 10:49 PM
valesai valesai is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Apr 2005
Server: Crushbone
Posts: 174
Default

Oooh that is frustrating. I'm going to have to think on that a minute.
__________________

C R A - B R I G A D E 3 - R A I D L E A D E R - [DoV Kill List] | [App To Join]

EliteUI


Don't forget to add me to your favorite Mod's list!
Reply With Quote
  #3  
Unread 08-25-2010, 04:42 AM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

Are you sure that Abilities.cmd1 = useability Lucan's Pact does actually get executed like that in your m1? Try to change the command in method 1 to a beginchatinput (or say) to see if that works at all (and if the part after the apostrophe is included).
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
  #4  
Unread 08-25-2010, 04:48 AM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

That was the other strange part, I actually use the say command to debug a lot, too.

I tried doing a:
say Parent.Abilities.cmd1
And:
say Parent.Button2.onpress
Both wit the same results, showing the full string with the apostrophe.
Drumstixx says, "useability Lucan's Pact"

When the button fails, I get nothing ingame. Usually if the spell is incorrectly typed, it would just say "This ability does not exist" but I don't even get that.
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
  #5  
Unread 08-25-2010, 04:56 AM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

Yeah but what I meant was try to change the usability to a say and see what happens then. Although you might not see what's happening, might be some encoding issue with the usability code choking on the Apostrophe and the parser not interpreting it right when loaded into a variable along with the command. You could also try to set

var1 = usability
var2 = Lucan's Pact
OnPress = var1 ## var2

and see what happens then.
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.

Last edited by gm9 : 08-25-2010 at 04:59 AM. Reason: added most of the post ;)
Reply With Quote
  #6  
Unread 08-25-2010, 05:08 AM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

Method 1 is what I currently use in my UI now btw.
I went and tried what you said.

Without an apostrophe it'll do a say command perfectly.

Soon as I add the apostrophe in, I get nothing. No text, no say, and no error/feedback.

I can populate the tooltip just fine with the apostrophe, which boggles me further.
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:03 PM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI