The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Vendor Supply
Author Message
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #8
RE: Vendor Supply
It's happening because the 2nd argument of serv.newitem is the amount value, so Sphere set the amount value of the pickaxe to: <eval(<argtxt[0]> (in the screenshot the amount value is 2). So you have to check if the item is actually a "stackable item".
but you already know that the pickaxe is not a stackable item, so you have to put each item in the backpack by bouncing it.

PHP Code:
on=7
if (0<ISEMPTY <ARGTXT[0]>>)||(STRMATCH(*[a-z]*,<ARGTXT[0]>))||!(STRMATCH(*[0-9]*,<ARGTXT[0]>))
src.sysmessage @09c1 This is not a real value!!
return 
1
elseif <src.findlayer(21).rescount i_gold> < (<ARGTXT[0]>) *100)
src.sysmessage @09c1 You do not have enought gold coins to trade.
else
FOR <eval(<
argtxt[0]>)>
serv.newitem i_pickaxe
new.bounce
ENDFOR
src.consume i_gold (<argtxt[0]>) *100
src
.sysmessage @09c1 You have buy <eval(<argtxt[0]>)> pickaxe's and pay <eval(<argtxt[0]>) *100)> gold's
return 1
endif 
06-15-2015 11:48 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Vendor Supply - Van Glan Bloom - 06-13-2015, 01:25 PM
RE: Vendor Supply - Van Glan Bloom - 06-13-2015, 11:08 PM
RE: Vendor Supply - Coruja - 06-15-2015, 07:23 AM
RE: Vendor Supply - Van Glan Bloom - 06-15-2015, 07:53 AM
RE: Vendor Supply - JohnVeritas - 06-15-2015, 09:38 AM
RE: Vendor Supply - XuN - 06-15-2015, 04:28 PM
RE: Vendor Supply - Van Glan Bloom - 06-15-2015, 10:46 PM
RE: Vendor Supply - darksun84 - 06-15-2015 11:48 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)