? Need help with save"txt (Page 2) ● SmileBASIC Source Forums

Sign In

Register
*Usernames are case-sensitive
Forgot my password
What's going on?? See: Site Update March 2022

Need help with save"txt

1 2
  • #21 ✎ 43 Arrow Thanks it worked why didn't somebody tell me before now Posted
  • #22 ✎ 1110 randomous Owner Robot Hidden Easter Eggs Second Year My account is over 2 years old Website Drawing I like to draw! Hobbies
    Thanks it worked why didn't somebody tell me before now
    It's hard to immediately know what a problem is in a program. That's why debugging usually takes the longest when making a program.
    Posted
  • #23 ✎ 477 SquareFingers As Lumage said, no-one wants to write your code for you. And, you made it difficult to help you. Among other things, you were given code that did not have this problem, no-one told you that your changes - changes that you told no-one - would be a problem because no-one is a mind-reader. Posted Edited by SquareFingers
  • #24 ✎ 202 JustGreat First Month Joined in the very first month of SmileBASIC Source Website Avatar Taboo I didn't change my avatar for 180 days Website Night Person I like the quiet night and sleep late. Express Yourself
    Thanks it worked why didn't somebody tell me before now
    Put this code near the beginning: VAR SAVE[5] It will make an array (essentially a bunch of variables put into one) that will store your save data.
    Just wanted to point this out
    Posted
  • #25 ✎ 477 SquareFingers
    Thanks it worked why didn't somebody tell me before now
    Put this code near the beginning: VAR SAVE[5] It will make an array (essentially a bunch of variables put into one) that will store your save data.
    Just wanted to point this out
    To be fair, later in that post: LOAD "DAT:SAVEDATA",SAVEDATA,0 12Me21 had it right, and in the other thread MZ592 and Minxrod both gave examples with proper declarations.
    Posted
  • #26 ✎ 43 Arrow No longer need help with saving But do need help with background animation Posted
  • #27 ✎ 43 Arrow When you use bganim to move background it move the entire layer not just one tile is there a way fix this Posted
  • #28 ✎ 1884 12Me21 Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself no. That's how BG works. To move smaller objects, use sprites instead. Posted
  • #29 ✎ 202 JustGreat First Month Joined in the very first month of SmileBASIC Source Website Avatar Taboo I didn't change my avatar for 180 days Website Night Person I like the quiet night and sleep late. Express Yourself Lumage, rename this page to "Arrow needs help with SmileBASIC". That's all it is anymore. Posted
  • #30 ✎ 43 Arrow Actually that was the last thing I need help with for a while Posted
  • #31 ✎ 43 CodeTrooper
    If the variable STATS is not declared, that's a problem. At or near the beginning of your code (but after CLEAR, if you use it), include DIM STATS[9] (or 5 or whatever the proper number is).
    ┈┈┈┈┈┈▕▔╲ ┈┈┈┈┈┈┈▏▕ ┈┈┈┈┈┈┈▏▕▂▂▂ ▂▂▂▂▂▂╱┈▕▂▂▂▏ ▉▉▉▉▉┈┈┈▕▂▂▂▏ ▉▉▉▉▉┈┈┈▕▂▂▂▏ ▔▔▔▔▔▔╲▂▕▂▂▂I
    Posted
  • #32 ✎ 227 Lacks April Fool's 2017 Contest Participant I participated in the SmileBASIC Source April Fool's 2017 Contest! Programming Contest Deep Sleep Hidden Website Beginner Programmer I'm just starting out! I'm still trying to grasp the basics. Programming Strength
    for saving numbers, I strongly reccommend that you use DAT files VAR SAVEARRAY[5] ... SAVEARRAY[0]=ATK SAVEARRAY[1]=DEF SAVEARRAY[2]=GOLD SAVEARRAY[3]=HP SAVEARRAY[4]=SP SAVE "DAT:SAVEFILE",SAVEARRAYand then LOAD "DAT:SAVEFILE",SAVEARRAY ATK=SAVEARRAY[0]etc. to load
    Old thread bump, but I do have a relevant question. Will this save the 'real numbers' with decimal points? I have numbers with 0.01 and stuff in my variables (?) for the cost of sand/how much it pays out, etc. And I was wondering if this method of saving will allow me to save Wonky numbers with decimal points. Also, is there a limit to how many things you can save? I have a feeling some of my numbers may end up extremely large as this clicker game progresses
    Posted
  • #33 ✎ 1884 12Me21 Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself It will save the exact values Posted
  • #34 ✎ 227 Lacks April Fool's 2017 Contest Participant I participated in the SmileBASIC Source April Fool's 2017 Contest! Programming Contest Deep Sleep Hidden Website Beginner Programmer I'm just starting out! I'm still trying to grasp the basics. Programming Strength
    It will save the exact values
    Thank you very much. It's all working just the way I want it to. :D
    Posted
  • #35 ✎ 43 Arrow I have a code using DAT files and its pretty good code it worked great for months but in one of the games I'm making with it it keeps changing variables on me when it's not supposed to and seems to be happening when it loads and I can't find anything in the should make it do that overall it works great with my first game I was making no problems at all Posted
1 2