Discussions

SmileBASIC Community

DobsDobs60

11/15/2016 5:03 PM ·Spoilers

Open Closed

prg:3 programing help

in my program program, 'prg:0', opens program 'prg:3' for text. this is event trigered. how do i get the 'sc3=1 in the prg:0 screen shot to be acknowledged in prg:3 without writng line code in prg:3 sc3=1. am i making sense

Advertisement

Comment

This post has no comments.

  • If you could show us the code that would be helpful.

    Yeahs0
    Played
  • sorry i thought i did

    Yeahs1
    Played
  • this may help. the 'sc2=1'from prg0 needs to be called in prg3. i know i could add sc2=1 to prg3 code but this is an event trigger and should only be recognized when the event occurs

    Yeahs1
    Played
  • yeah, i don't understand

    Yeahs0
    Played
  • i am using prg3 to print a copy of all the scrolls found by the character. the program only prints the scrolls found to that point. the scrolls are found using prg0 so the identifyer for finding a particular scroll is in prg0. when gosub "3:@printscpt" calls prg3, prg3 will not remember the identifyer for scroll found in prg sc3=1. how do i get prg3 to recognize prg0 variable sc3=1

    Yeahs1
    Played
  • VAR(slot, variable) iirc, the variable parameter is either the variable name itself or a string of the name.

    Yeahs0
    Played
  • ahhhhhhhhh thank you very much and thank you for your patience with this old fart. so to see if i understand i would add in prg3---if var(0,sc3)==1 then gosub @srcipt3

    Yeahs1
    Played
  • Does it work?

    Yeahs0
    Played
  • yes it does. i kept getting syntax errors. i found the needed syntax was " " inside ( ) and the : between the slot number and var name. but yes this does what i needed. thank you for your help. here is the screen shot of the working line code

    Yeahs1
    Played
  • uw

    Yeahs0
    Played

Add a Comment

You must sign in to post a comment.

Sign in using a Nintendo Network ID to connect to users around the world by writing posts and comments and by giving Yeahs to other people's posts. You can create a Nintendo Network ID using your Wii U console or your system in the Nintendo 3DS family.

Use of Miiverse Details about Miiverse

Report Violation to Miiverse Administrators

You are about to report a post with content which violates the Miiverse Code of Conduct. This report will be sent to Nintendo's Miiverse administrators and not to the creator of the post.

Violation Type:

Post ID: 3DB-NBL7-EJ9-9E2L-XAY-4Y7A

Report Violation to Miiverse Administrators

You cannot report posts made automatically by a software title.

Edit Post

Select an action: