• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Question - Having trouble ARG parsing a string line. help ???

Joined
May 5, 2021
RedCents
I am trying to pass information from one toon to another.. using #chat

I am passing 3 pieces of data in one line.. COMMAND ... MOB ID# ... ITEM LINK

Example: LOOTIT 133 Hand Wraps

Where Hand Wraps is the actual in game item link.. just copied to the tell line.

That would produce 4 args .... ARG1=LOOTIT ARG2=133 ARG3=Hand ARG4=Wraps

I then REASSEMBLE the item link part by merging all args after arg 2 together into one word.....

The issue i am having.... when i parse it using ARG or TOKEN .. using SPACE as the delimeter.. it works fine I can force the space seperrated parts of the ITEM LINK together after the ARG parse .. to reasseble the full item name.... but NEVER if the item link contains an Apostrophe or TICK ion the naming convention....

How can i essentially.. PASS the ITEM LINK NAME... in chat relay.. or any viable method... with the correct item name.. cause it's breaking on any link that has TICK or Apostrophe....
 
i'm missing some context here.

why can't you "slap the item name in quotes" and then eliminate that extra steps?
 
I am trying to pass information from one toon to another.. using #chat

I am passing 3 pieces of data in one line.. COMMAND ... MOB ID# ... ITEM LINK

Example: LOOTIT 133 Hand Wraps

Where Hand Wraps is the actual in game item link.. just copied to the tell line.

That would produce 4 args .... ARG1=LOOTIT ARG2=133 ARG3=Hand ARG4=Wraps

I then REASSEMBLE the item link part by merging all args after arg 2 together into one word.....

The issue i am having.... when i parse it using ARG or TOKEN .. using SPACE as the delimeter.. it works fine I can force the space seperrated parts of the ITEM LINK together after the ARG parse .. to reasseble the full item name.... but NEVER if the item link contains an Apostrophe or TICK ion the naming convention....

How can i essentially.. PASS the ITEM LINK NAME... in chat relay.. or any viable method... with the correct item name.. cause it's breaking on any link that has TICK or Apostrophe....
Change the delimiter to something you won't see in game like | Should be sufficient (it's a shifted \ found above enter on a US keyboard)
 
i'm missing some context here.

why can't you "slap the item name in quotes" and then eliminate that extra steps?
Because it doesnt matter ... encapsulating the item link in quotes still yields the breaking issue

It will parse all up to the point of the item link... bu BOINKS there.... even when encapsulated in quotes

Although.. when i tested that already.. i was passign the item link itelsf.. and attempting to encampuate it inside the macro in quotes... not from the direct command line initial imput...

let me change that and test.
 
so if your syntax is ${Arg3}${Arg4} , then "Item Link" returns as 'HandWraps' ? but you want 'Hand Wraps', and you want to insert a space between Arg3 and Arg4, but Arg3 is pruned/trimmed and doesn't contain a trailing space ?
 
Ok.. sorry it took so long, havent had the ability to get this posted before now.
The gist of it is... I am passing the info to the toon to loot.. via TELLS ... / #chat tell .... picking it up.

The receiver (who is running the macro that gets the command)... recveives the LOOTIT command to trigger the looting sub... name of the toon who is going to loot.. the corpse ID number to loot.. and the ITEM TO LOOT ... (in the form of the LINK)... then he has the appropriate toon go loot that item now that he knows the vital info.

so.. someone does a :
/tell JoeBloe lootit BotNameToLoot 1213 Blazing Sword of Kedge .. ( where the Blazing Sword of Kedge is the actual item link in game )

The receiver can't get the link properly if the itemlink has an apostrophe or tick in it... I tried putting the portion for the link in quotes.. the parsed elements... just have not tried using a different delimiter than space atm.
Code:
        |-------------------------------------------------------------------------------------------------------
        /if (${Select[${ChatText},lootit]}) {
            /echo RECEIVED COMMAND TO LOOT <lootit TOONNAME COPRSE_ID# ITEMLINK> !
 
            /declare y int local 0

            |-------------------------------------------------
            | Set variables to space delimited Arg[y] elements
            |-------------------------------------------------
            /varset FullChatText "${ChatText}"
            /varset LootingToon  ${ChatText.Arg[2, ]}
            /varset LootCorpseID ${ChatText.Arg[3, ]}
            /varset ItemToLoot
            |-------------------------------------------------
 
            |------------------------------------------------
            | DEBUG ELEMENTS OF ARGED ITEM NAME
            |------------------------------------------------
            |------------------------------------
            /rs FullChatText = (${FullChatText})
            /rs LootingToon = (${LootingToon})           
            /rs LootCorpseID = (${LootCorpseID})           
            |------------------------------------
            /for y 4 to 10   
                /if (${ChatText.Arg[${y}, ].NotEqual[NULL]} || ${ChatText.Arg[${y}, ].Find[']} || ${ChatText.Arg[${y}, ].Find[`]}) {
                    /if (${ChatText.Arg[${y}, ].NotEqual[NULL]}) /rs Arg[${y}]: (${ChatText.Arg[${y}, ]})
                    /if (${ChatText.Arg[${y}, ].Find[`]}) /rs ARG has tick mark
                    /if (${ChatText.Arg[${y}, ].Find[']}) /rs ARG has apostrophe
                    /varset ItemToLoot ${ItemToLoot} ${ChatText.Arg[${y}, ]}
                }
            /next y
            /rs ItemToLoot = (${ItemToLoot})
            |------------------------------------
 
            |------------------------------------
            /if (${RaidAnnounce} && ${InARaid}) {
                /rs ! RECEIVED COMMAND TO LOOT <lootit ${LootingToon} ${LootCorpseID} ${ItemToLoot}> !
            } else {
                /g ! RECEIVED COMMAND TO LOOT <lootit ${LootingToon} ${LootCorpseID} ${ItemToLoot}> !
            }
            |------------------------------------
 
            |------------------------------------
            |--- DO SUB CALL TO LOOT <lootit ${LootingToon} ${LootCorpseID} ${ItemToLoot}> !
            /call ForceToon2LootIt
            |------------------------------------
        }
        |-------------------------------------------------------------------------------------------------------

They Y loop is to assemble the item name together since it would be split by spaces... thats the part that blows up if the itemlink has a tik or apostophe.

I will try to test using different delimeter in the mean time.. as suggested by

ChatWithThisName​

I'm thinking that might work.. using a pipe as the delimeter since i can just set
Code:
/varset ItemToLoot "${ChatText.Arg[4,|]}"
but my availability in game is limited... hence the slow reply

One thing i also need to try.. is having the sender actually put a quote mark... enter the item link.. and close it with a quote mark.. so the entire itemlink is encapsulated in the original tell in a quote.

Not sure if there is a way to set a variable to be any and all args above 3... so i can possibly encapsulate that in a quote....?
 
Last edited:
Question - Having trouble ARG parsing a string line. help ???

Users who are viewing this thread

Back
Top
Cart