XN0X0neX Posted November 8, 2013 Share Posted November 8, 2013 (edited) Okay so I noticed a problem in a script im using for teleportation.It works yes but small / annoying problem.Say i Activate the object that opens up the places to teleport to. Well I decide to click never mind and not go anywhere.Well if I pause the game and save it, once its done saving the first page of the teleportation menu pops up without me activating the object heres the lines of code down to the end of the first page.What variable if causing this to happen? Begin XN0XTeleFromHomeXshort XCounterXshort buttonIf ( MenuMode == 1 ) ReturnendifIf ( OnActivate = 1) Set XCounterX to 2endifIf ( XCounterX == 0 ) Set XCounterX to 0 ReturnendifIf ( XCounterX == 2 ) Set XCounterX to 3 Messagebox "Where would you like to travel?" "Towns" "Guilds" "Camps" "Telvanni VIllages" "Never Mind"endifIf ( XCounterX == 3 ) Set button to getbuttonpressedIf ( button == 0 ) Set XCounterX to 4 Messagebox "Which Town?" "Caldera" "Pelagiad" "Ald'Ruhn" "Balmora" "Vivec" "Seyda Neen" "Maar Gan" "Page 2" "Main Menu"elseIf ( button == 1 ) Set XCounterX to 5 Messagebox "What Guild?" "Fighter's Guild" "Mages Guild" "Main Menu"elseif ( Button == 2 ) Set XCounterX to 9 Messagebox "What Camp?" "Ahemmusa Camp" "Zainab Camp" "Urshilaku Camp" "Main Menu"elseif ( Button == 3 ) Set XCounterX to 12 Messagebox "Which Tel Tower?" "Tel Aruhn" "Tel Branora" "Tel Fyr" "Tel Mora" "Tel Uvirith" "Tel Vos" "Main Menu"elseif ( Button == 3 ) Set XCounterX to 0 endifendifIf ( XCounterX == 4 ) set button to getbuttonpressedIf ( button == 0 ) Player->PositionCell -10383, 17050, 1347, 0, "Caldera" set XCounterX to 0Elseif ( button == 1 ) Player->PositionCell 2507, -56048, 1570, 0, "Pelagiad" set XCounterX to 0elseif ( button == 2 ) Player->PositionCell -17088, 52737, 1920, 0, "Ald-ruhn" set XCounterX to 0elseif ( button == 3 ) Player->PositionCell -21282, -17752, 956, 0, "Balmora" set XCounterX to 0elseif ( button == 4 ) Set XCounterX to 10 messagebox "What part of Vivec?" "Vivec" "Vivec, Rendoran" "Vivec, St.Olms" "Vivec, Arena" "Vivec, Hlaalu" "Vivec, Telvanni" "Vivec, St.Delyn" "Vivec, Foreign Quarter" "Towns"elseif ( button == 5 ) Player->PositionCell -11239, -73981, 120, 0, "Seyda Neen" set XCounterX to 0elseif ( button == 6 ) Player->PositionCell -22366, 100144, 2524, 0, "Maar Gan" set XCounterX to 0elseif ( button == 7 ) set XCounterX to 8 Messagebox "Which Town?" "Sadrith Mora" "Ebonheart" "Dagon Fel" "Vos" "Ald Velothi" "Suran" "Gnaar Mok" "Page 1" "Page 3"elseif ( button == 8 ) set XCounterX to 2 messagebox "Where would you like to travel?" "Towns" "Guilds" "Camps" "Tel Tower's" "Never Mind" endifendif Edited November 8, 2013 by XN0X0neX Link to comment Share on other sites More sharing options...
MorielAtta Posted November 8, 2013 Share Posted November 8, 2013 You have a typo. In your chain of elsifs you have "elseif ( button == 3 )" twice in a row. Link to comment Share on other sites More sharing options...
Recommended Posts