SRL Archive - OSR Help

problem with WithdrawItem


Shuttleu

2010-08-02 16:40:30

now i have absolutly no idea why, but i always get the following
** Warning in WithdrawItem: Could not Find dtm in Bank. [Uptext: hide]**

this is the code

WithdrawItem(DTM, 'dtm', 0, 'hide', [])

it hovers over the Cowhide but never withdraws any…

and before anyone says it, the Cowhide is called Cowhide in the game

~shut

Narcle

2010-08-02 18:04:30

From: Shuttleu
now i have absolutly no idea why, but i always get the following

this is the code

WithdrawItem(DTM, 'dtm', 0, 'hide', [])

it hovers over the Cowhide but never withdraws any…

and before anyone says it, the Cowhide is called Cowhide in the game

~shut


If its mousing over the DTM correctly then its probably the uptext reading Cowhide wrong. Try 'owh', 'whi', 'whid' or something like that, would be even better if you use an array of uptexts.

Shuttleu

2010-08-02 18:06:51

From: Narcle
If its mousing over the DTM correctly then its probably the uptext reading Cowhide wrong. Try 'owh', 'whi', 'whid' or something like that, would be even better if you use an array of uptexts.


i have already tried using different combinations and it never finds it (well it does but it never withdraws any and it says it hasn't), and i dont thnk you can use a array of strings can you?

~shut

NCDS

2010-08-02 18:14:27

From: Shuttleu
i have already tried using different combinations and it never finds it (well it does but it never withdraws any and it says it hasn't), and i dont thnk you can use a array of strings can you?

~shut


WaitOptionMulti(); WaitUpTextMulti(); etc. ;)

Edit: NVM.

You could make an array of strings however and loop through them.

StrArr := [uptextsHere];
for i := 0 to High(StrArr) do
WithdrawItem(DTM, 'dtm', 0, StrArr[i], [])
etc..

Narcle

2010-08-02 18:15:40

WithDrawItemEx or WithDrawItemMulti I think? Don't have SRL on the computer or I'd look real quick.

Do a test and have it read the uptext of the item and write it out to see what its reading.

Shuttleu

2010-08-02 18:56:09

i got this :(
Compiled succesfully in 1560 ms.
SRL Compiled in 16 msec
WithdraZ-1 Cowrhide / 7 more options
Successfully executed.
Compiled succesfully in 1420 ms.
SRL Compiled in 15 msec
WithdraZ-1 Cowrhide / 7 more options
Successfully executed.
Compiled succesfully in 1404 ms.
SRL Compiled in 15 msec
Withdraw-1 Cowl,ide / 7 more options - . _ _
Successfully executed.
Compiled succesfully in 1310 ms.
SRL Compiled in 31 msec
Withdr^1 ^hide / 7 more options
Successfully executed.

~shut

NCDS

2010-08-02 19:01:44

From: Shuttleu
i got this :(
Compiled succesfully in 1560 ms.
SRL Compiled in 16 msec
WithdraZ-1 Cowrhide / 7 more options
Successfully executed.
Compiled succesfully in 1420 ms.
SRL Compiled in 15 msec
WithdraZ-1 Cowrhide / 7 more options
Successfully executed.
Compiled succesfully in 1404 ms.
SRL Compiled in 15 msec
Withdraw-1 Cowl,ide / 7 more options - . _ _
Successfully executed.
Compiled succesfully in 1310 ms.
SRL Compiled in 31 msec
Withdr^1 ^hide / 7 more options
Successfully executed.

~shut


Try using just 'ide' then, as that seems to be the easiest found combination.