Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A Question on File-Options
Author Message
admin phoenix
Master
**

Posts: 354
Likes Given: 1
Likes Received: 23 in 13 posts
Joined: Mar 2012
Reputation: 3



Post: #11
RE: A Question on File-Options
sure.
I donĀ“t need the backwards yet but maybe someone need it in the future Smile
02-16-2013 12:19 AM
Find all posts by this user Like Post Quote this message in a reply
Shidhun
Journeyman
*

Posts: 59
Likes Given: 5
Likes Received: 3 in 3 posts
Joined: Jul 2012
Reputation: 1



Post: #12
RE: A Question on File-Options
Ok,

i'm a little bit frustrated after trying to solve this "problem". Maybe i'm using the wrong syntax, but i just don't see my error. Maybe you could help me out.

I have a number of Lists, containing several Informations on Items (like Name,baseid,color,more1h,price)

Now i wan't to check, if another Item matches one Element in some of these Informations. In my case i want to know, whether the List contains an element with the same Name/BaseID/Color.

So this is how my List looks like :

//Syntax : <name>,<baseid>,<color>,<amount>,<more1h>,<value>
Quote:[LIST pv_01e6f_blacksmithing]
ELEM="Test Halberd,i_halberd,044,1,43,175"
ELEM="War Axe,i_axe_war,026,1,45,143"
....


In My Function i have the following Script-Entries :
Quote:.....
REF1=<src.tag.itemuid>
REF2=<src.tag.vendor>

for 0 (<list.pv_<REF2>_<local.skillmake>.count>-1)
local.string=<uid.<REF1>.name>,<uid.<REF1>.baseid>,<uid.<REF1>.color>
local.element=<list.pv_<REF2>_<local.skillmake>.<local._for>>
serv.log String : <local.string>
serv.log Element : <local.element>
if (STRMATCH("*<local.string>*", <local.element>))
serv.log Match found in Line : <eval <local._for>>
endif
endfor

And this are the the server-logs :

Quote:String : Test Halberd,i_halberd,044
Element : Test Halberd,i_halberd,044,1,43,175
String : Test Halberd,i_halberd,044
Element : War Axe,i_axe_war,026,1,45,143

Normaly, there should be an Log-Entry like :
Quote:Match found in Line : 0

So something with STRMATCH has to be wrong. Maybe i'm just not seeing my error, or i'm just to tired.

I could of course make a workaround splitting both strings into their Arguments, and comparing each pair, but i'd prefer STRMATCH.
03-04-2013 06:12 PM
Find all posts by this user Like Post Quote this message in a reply
Ben
Sphere Developer
*****

Posts: 612
Likes Given: 2
Likes Received: 123 in 70 posts
Joined: Mar 2010
Reputation: 18

SphereCommunity

Post: #13
RE: A Question on File-Options
try to take out the quotes...

if (STRMATCH(*<local.string>*, <local.element>))

[edit]
just thought about it... the "," are probably what is causing the problem

AxisII's current version: 2.0.4j
AxisII SourceCode on Github
AxisII up to date changelog
(This post was last modified: 03-05-2013 08:56 AM by Ben.)
03-05-2013 08:55 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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