![]() |
Rentable Room Script - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Rentable Room Script (/Thread-Rentable-Room-Script) |
Rentable Room Script - pinku - 11-15-2013 04:24 AM Found on downloads section: Code: [comment] I'm trying it.. but does not work.. Before trying, I made sure I set the door event with .xevents T_DOOR_RENTAL After that, I double click the key and link to the door. It says "Linked" and then, does not work anymore. Keeps saying when I try to lock the door with the key: "The key does not fit into that lock." Any ideas? I can't get it.. RE: Rentable Room Script - darksun84 - 11-15-2013 05:14 AM Try this, change PHP Code: IF !(<ARGO.EVENTS>==T_DOOR_RENTAL) with PHP Code: IF !(<ARGO.isevent>==T_DOOR_RENTAL) RE: Rentable Room Script - RanXerox - 11-15-2013 05:30 AM The syntax for isevent is more like this I think: PHP Code: IF !(<ARGO.isevent.T_DOOR_RENTAL>) RE: Rentable Room Script - pinku - 11-15-2013 07:12 AM Now it does work, however, there is still an issue. I can use a new key on the same door taken before.. Again, it's giving me no errors on console, so I'm pretty confused. Seems like this checker isn't working: ELIF(<EVAL 0<ARGO.TAG.LINKED>>==1) SYSMESSAGE=This key does not fit that lock! (Door already rented out) RETURN 1 RE: Rentable Room Script - x77x - 11-15-2013 02:47 PM can you rent it by the hour? RE: Rentable Room Script - darksun84 - 11-16-2013 01:27 AM (11-15-2013 07:12 AM)pinku Wrote: Now it does work, however, there is still an issue. Just tested, the problem is there is no blank space between ELIF and the condition ![]() RE: Rentable Room Script - RanXerox - 11-16-2013 04:53 AM PHP Code: ELIF(<EVAL 0<ARGO.TAG.LINKED>>==1) ...is unnecessarily complicated, you can do this instead: PHP Code: ELIF (<ARGO.TAG0.LINKED>) The () marks in an IF statement imply it is to be evaluated, and putting the 0 after the keyword TAG prevents an error from being thrown if the TAG does not exist. The condition will be true when the TAG has any value other than zero, so testing specifically for the value of 1 is not necessary. RE: Rentable Room Script - pinku - 11-16-2013 04:52 PM Well, it works very well.. until I open the door.. lol Does anyone else have this problem? I don't think it's related to my house system, but who knows? |