? Saveing the game (Page 1) ● SmileBASIC Source Forums

Sign In

Register
*Usernames are case-sensitive
Forgot my password
Another contest? You asked for it!

Saveing the game

  • #1 ✎ 149 Komodo Pokemon Is Awesome! I love Pokemon! Express Yourself Drawing I like to draw! Hobbies Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength So you know in all the video games how you can "save" how do you do that in smilebasic because you can't use the save command in the edit screen. Posted
  • #2 ✎ 123 glennxserge VAR SOMEVAR1=1 VAR SOMEVAR2=20 DIM SARRAY[0] PUSH SARRAY,SOMEVAR1 PUSH SARRAY,SOMEVAR2 SAVE "DAT:SAVEFILE",SARRAY The above saves an array to a data file called, SAVEFILE. Reading this back in is as easy as: DIM SARRAY[0] LOAD "DAT:SAVEFILE",SARRAY, FALSE ' FALSE suppresses user confirmation dialog I'm not sure what you mean when you say, SAVE doesn't work in edit screen. What problem are you running into? Posted
  • #3 ✎ 149 Komodo Pokemon Is Awesome! I love Pokemon! Express Yourself Drawing I like to draw! Hobbies Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength well for some reason the save command whould not work in the edit screen. Posted
  • #4 ✎ 123 glennxserge what does the error message say? Posted
  • #5 ✎ 98 LohadL Amazing Contributor Someone thinks I'm an awesome person who has done so much for the community! Achievements Staff Pick "Your program is one of our favorites!" - Staff Achievements Pokemon Is Awesome! I love Pokemon! Express Yourself Just TYPE what glenn wrote in edit mode and press START to run it. It will work. Posted
  • #6 ✎ 149 Komodo Pokemon Is Awesome! I love Pokemon! Express Yourself Drawing I like to draw! Hobbies Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength wait it's working now thanks. Posted
  • #7 ✎ 43 Arrow Mine keeps saying duplicate variable Posted
  • #8 ✎ 275 Minxrod Summer 2016 Contest Participant I participated in the SmileBASIC Source Summer 2016 Contest! Programming Contest Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Pokemon Is Awesome! I love Pokemon! Express Yourself
    Mine keeps saying duplicate variable
    What is your code? Also, this topic is two or threeish months old...?
    Posted
  • #9 ✎ 118 mystman12 First Day Joined on the very first day of SmileBASIC Source Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Video Games I like to play video games! Hobbies Bumping and old thread is better than making a duplicate thread IMO. Posted
  • #10 ✎ 41 ezman
    Mine keeps saying duplicate variable
    This is usually because you aren't doing an ACLS at the start of your code, so the array is already defined the second time you run your program. (This is assuming that you've already checked your code to make sure you don't have DIM MYARRAY twice, which you will do if you've copied glennxserge's code without reading it)
    Posted
  • #11 ✎ 187 Perska Summer 2016 Contest Winner I won the SmileBASICSource Summer 2016 Contest! Programming Contest Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength RNG Hidden Easter Eggs ACLS does not clear the variables and arrays. It just resets the graphics n' stuff. The reason the error pops up is probably because you are running the code in DIRECT mode multiple times. That or there are multiple variable definitions for the variable in the code. Posted
  • #12 ✎ 43 Arrow Do you have a better example because I need one this is the last thing I need for standard open rpg and I'll have everything I need Posted
  • #13 ✎ 43 Arrow And I always use acls Posted