Author Topic:  Script bugs  (Read 273 times)

0 Members and 1 Guest are viewing this topic.

empire 3001

  • Jr. Member
  • **
  • Posts: 27
    • View Profile
    • Awards
  • Xbox: empire 3001
Script bugs
« on: June 06, 2018, 09:39:48 PM »
Bug found on the waiting command

        Example

setblock [dirt] [x,y,z]
wait [3000]
if
is block [x,y,z] [dirt] [true]
then
commit
endif

it wont spawn the block untill the 3 secs and i doubled checked to see if it was before the command
well the block is there but its invisible.
empire 3001

The Gold Knight

  • Legendary Member
  • *****
  • Posts: 1092
  • My Forgeplex is better ;)
  • Awards 3 years on site Site art contributions/TPs in-game/Contest winners 5 years on site Top contributors to the forum downloads. 4 years on site Donated a giveaway prize. (Must be a prize of cash value.) 2 years on site Former MotM winners 1 year on site Week 1 members w/25+ posts (4/13/13-4/20/13)
    • View Profile
    • Insert Clickbait Title Here!
    • Awards
  • Other: 何
Re: Script bugs
« Reply #1 on: June 07, 2018, 02:56:00 AM »
Bug found on the waiting command

        Example

setblock [dirt] [x,y,z]
wait [3000]
if
is block [x,y,z] [dirt] [true]
then
commit
endif

it wont spawn the block untill the 3 secs and i doubled checked to see if it was before the command
well the block is there but its invisible.
That's because the commit command is used to force a graphics refresh. Your script is only making sure the block is visible after the 3 second wait.

empire 3001

  • Jr. Member
  • **
  • Posts: 27
    • View Profile
    • Awards
  • Xbox: empire 3001
Re: Script bugs
« Reply #2 on: June 07, 2018, 03:20:26 PM »
well that was just an example I didn't use commit on my script, my script is to long to post so I just wrote another one.

the glitch is there ive biuld it on the xbox 360 before and it worked fine on that but glitchey on the pc.
empire 3001

The Gold Knight

  • Legendary Member
  • *****
  • Posts: 1092
  • My Forgeplex is better ;)
  • Awards 3 years on site Site art contributions/TPs in-game/Contest winners 5 years on site Top contributors to the forum downloads. 4 years on site Donated a giveaway prize. (Must be a prize of cash value.) 2 years on site Former MotM winners 1 year on site Week 1 members w/25+ posts (4/13/13-4/20/13)
    • View Profile
    • Insert Clickbait Title Here!
    • Awards
  • Other: 何
Re: Script bugs
« Reply #3 on: June 07, 2018, 07:24:44 PM »
well that was just an example I didn't use commit on my script, my script is to long to post so I just wrote another one.

the glitch is there ive biuld it on the xbox 360 before and it worked fine on that but glitchey on the pc.
If you don't post the actual script we won't be able to tell you if it's an actual bug or not. If you don't use commit on your actual script, you probably should.

empire 3001

  • Jr. Member
  • **
  • Posts: 27
    • View Profile
    • Awards
  • Xbox: empire 3001
Re: Script bugs
« Reply #4 on: June 09, 2018, 12:24:56 AM »
My script is about 150 lines but I shortened it to 15 for an example
if
is random [100,100]
then
setblock [rel:x,y,z] [dirt]
endif
if
isblock [rel:x,y,z] [dirt] [true]
then
inventory [actor] [add] [goldpieces] [100]
notify [100gp] [local] [9,9,9]
setpower [rel:x,y,z] [on]
wait [3000]
setpower [rel:x,y,z] [off]
endif
"Optional" commit

the block should appear but is invisable somtimes it works right away sometimes it doesnt should glitch within 5 trys.
empire 3001

empire 3001

  • Jr. Member
  • **
  • Posts: 27
    • View Profile
    • Awards
  • Xbox: empire 3001
Re: Script bugs
« Reply #5 on: June 12, 2018, 02:11:56 PM »
Bug found on the waiting command

        Example

setblock [dirt] [x,y,z]
wait [3000]
if
is block [x,y,z] [dirt] [true]
then
commit
endif

it wont spawn the block untill the 3 secs and i doubled checked to see if it was before the command
well the block is there but its invisible.
That's because the commit command is used to force a graphics refresh. Your script is only making sure the block is visible after the 3 second wait.
Yup sorry no bug lol its been a while since I script... Thanks
empire 3001