Qmanage/Qfunction help

Robert

Actual Jesus
VIP
Jan 1, 1970
4,609
65
104
Yes.
Hi all

Please can you help with the following:

Ive created in qfunction a script that allows you to buy/sell items buy typing @shop.

The various different shops where then seperated into different screens however as they are in the same qfunction they all show on the same buy lists.

Therefore i was looking to have qfunction/qmanage call a text file.

Ive tried the [CALL] function in both qfunction and qmanage but the m2 just throws up an error saying it cannot find the script:

[@shop]
Hi Welcome to the shop\
<Armour/@Armour>

[@Armour]
CALL [\Common\Armour.txt]@main


It always errors saying it cant find the file no matter where i locate it, any ideas?
 

Fire

Golden Oldie
Golden Oldie
Apr 15, 2003
1,302
1
195
it uses relative pathing, try taking out the path destination and just leave the file and see where it looks for the file...
then use the ..\ to move around to the path you are after.

if you have already done that make sure you have put the { } around the code in each of the files.

also try using a different @main etc code for each of the shop files just in case that is causing you a problem
 
Upvote 0

mStation

Golden Oldie
Golden Oldie
Oct 29, 2003
2,042
69
255
♫♪♫ ♦♥♠♣ ♀♂♀
i think fire already said all the things u needed to check.. if u can't get it to work u can try again without call function and see if you can make it work properly.. i think before u had problems with the @functions and a few BREAKS missing.. thats all
 
Upvote 0

Mir2World

Dedicated Member
Dedicated Member
Oct 22, 2008
112
2
45
Simple way for you reberto!

put the text file into envir file and put ..\FILENAME.TXT

or

what ur system is looking for with:
[@Armour]
CALL [\Common\Armour.txt]@main
is
envir/market_def/common/armour.txt

change to
CALL [..\Common\Armour.txt]@main
 
Upvote 0

Robert

Actual Jesus
VIP
Jan 1, 1970
4,609
65
104
Yes.
Works a treat thank u.

However now the script runs i cant buy/sell from it, ive added the settings to the top of the script.
 
Upvote 0

Fire

Golden Oldie
Golden Oldie
Apr 15, 2003
1,302
1
195
you would need to add them to the top of the qfunction and qmanage
 
Upvote 0