≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Problem javascript
Posted by:
(you are not logged in)
Enter the missing letter in: "Interna?ional"
(you are not logged in)
Text:
[quote][b]Robo[/b] wrote: I don't know whats wrong with this javascript - can anyone help me?: It is supposed to add a 2nd lot of quantity if you collect the same item twice, ie variable waters = 2 but doesn't work......so frustrating...anyone ? var slot = ccbGetCopperCubeVariable("slav"); var item = ccbGetCopperCubeVariable("watersProx"); var qty = ccbGetCopperCubeVariable("waters"); function allocateLoot() { qty=(qty+1); ccbSetCopperCubeVariable("waters",qty); if (qty=1) { print ("new item added"); if (slot=1) {ccbSetCopperCubeVariable("slt1",item)} else {if (slot=2) {ccbSetCopperCubeVariable("slt2",item)} else {if (slot=3) {ccbSetCopperCubeVariable("slt3",item)} else {if (slot=4) {ccbSetCopperCubeVariable("slt4",item)} else {if (slot=5) {ccbSetCopperCubeVariable("slt5",item)} else {if (slot=6) {ccbSetCopperCubeVariable("slt6",item)} else {if (slot=7) {ccbSetCopperCubeVariable("slt7",item)} else {if (slot=8) {ccbSetCopperCubeVariable("slt8",item)} else {if (slot=9) {ccbSetCopperCubeVariable("slt9",item)} else {if (slot=10) {ccbSetCopperCubeVariable("slt10",item)} else {if (slot=11) {ccbSetCopperCubeVariable("slt11",item)} }}}}}}}}}} print("value inside slt1 is "+item); ccbSetCopperCubeVariable("slav",(slot+1)); else {if (qty>1) {print ("extra item picked up")} } }}[/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact