View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002439SphereServerexecutable - windows buildpublic16-12-14 22:3616-12-14 23:20
ReporterGandalfs 
Assigned ToBen 
PrioritynormalSeveritytrivialReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0002439: Problem With || in <src.targ.baseid>
DescriptionIf you use this sintax:

IF (<SRC.TARG.BASEID>!=i_reag_black_pearl) || (<SRC.TARG.BASEID>!=i_reag_mandrake_root)

This never work, only work if you use one condition but never two or more.

example for if you need test:

[ITEMDEF i_tester]
NAME=TESTER
ID=i_spellbook
TYPE=t_normal
ON=@DClick
TARGET
Return 1

on=@targon_item
IF (<SRC.TARG.BASEID>!=i_reag_black_pearl) || (<SRC.TARG.BASEID>!=i_reag_mandrake_root)
SRC.SYSMESSAGE @07a1 TEST // this execute all times
return 1
ENDIF
serv.b TEST <SRC.TARG.BASEID>
TagsNo tags attached.
Nightly VersionAutomated (specify build number)
Experimental FlagsNone
Option FlagsNone
Internal Build Number
Attached Files

- Relationships

-  Notes
(0002592)
Gandalfs (reporter)
16-12-14 22:49
edited on: 16-12-14 23:11

i check now the problem is two conditions in negative.
The <SRC.TARG.TYPE> have the same problem.


on=@targon_item
serv.b TEST <SRC.TARG.type>
IF (<SRC.TARG.type>!=t_reagent) // This perfect work
SRC.SYSMESSAGE @07a1 TEST1
else
SRC.SYSMESSAGE @07a1 TEST2
ENDIF
return 1

on=@targon_item
serv.b TEST <SRC.TARG.type>
IF (<SRC.TARG.type>=t_reagent) || (<SRC.TARG.type>=t_normal) // this work perfect
SRC.SYSMESSAGE @07a1 TEST1
else
SRC.SYSMESSAGE @07a1 TEST2
ENDIF
return 1


on=@targon_item
serv.b TEST <SRC.TARG.type>
IF (<SRC.TARG.type>!=t_reagent) || (<SRC.TARG.type>!=t_normal) // if you add two conditions or more in negative this dont work.
SRC.SYSMESSAGE @07a1 TEST1
else
SRC.SYSMESSAGE @07a1 TEST2
ENDIF
return 1


I test <SRC.TARG.name> and this normal work.

(0002593)
Ben (manager)
16-12-14 23:20

There is absolutely nothing wrong here... it's your condition that is wrong.
If I translate your condition to plain words:
IF (<SRC.TARG.BASEID>!=i_reag_black_pearl) || (<SRC.TARG.BASEID>!=i_reag_mandrake_root)
It mean (if the targ's baseid is not i_reag_black_pearl or not i_reag_mandrake_root) and since it will not be one or the other at any given point, it's always true.

what you are looking for is IF (<SRC.TARG.BASEID>!=i_reag_black_pearl) && (<SRC.TARG.BASEID>!=i_reag_mandrake_root)

- Issue History
Date Modified Username Field Change
16-12-14 22:36 Gandalfs New Issue
16-12-14 22:49 Gandalfs Note Added: 0002592
16-12-14 22:49 Gandalfs Note Edited: 0002592 View Revisions
16-12-14 22:49 Gandalfs Note Edited: 0002592 View Revisions
16-12-14 22:52 Gandalfs Note Edited: 0002592 View Revisions
16-12-14 22:53 Gandalfs Note Edited: 0002592 View Revisions
16-12-14 23:00 Gandalfs Note Edited: 0002592 View Revisions
16-12-14 23:00 Gandalfs Note Edited: 0002592 View Revisions
16-12-14 23:08 Gandalfs Note Edited: 0002592 View Revisions
16-12-14 23:09 Gandalfs Note Edited: 0002592 View Revisions
16-12-14 23:09 Gandalfs Note Edited: 0002592 View Revisions
16-12-14 23:10 Gandalfs Note Edited: 0002592 View Revisions
16-12-14 23:10 Gandalfs Note Edited: 0002592 View Revisions
16-12-14 23:11 Gandalfs Note Edited: 0002592 View Revisions
16-12-14 23:11 Gandalfs Note Edited: 0002592 View Revisions
16-12-14 23:11 Gandalfs Note Edited: 0002592 View Revisions
16-12-14 23:20 Ben Note Added: 0002593
16-12-14 23:20 Ben Status new => closed
16-12-14 23:20 Ben Assigned To => Ben
16-12-14 23:20 Ben Resolution open => no change required


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker