? LOADV bug? (Page 1) ● SmileBASIC Source Forums

Sign In

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

LOADV bug?

  • #1 ✎ 123 kitesinpowerlines Avatar Block I didn't change my avatar for 30 days. Website Avatar Embargo I didn't change my avatar for 90 days Website Avatar Taboo I didn't change my avatar for 180 days Website I didn’t see his documented anywhere so I’ll post it here. In SB4 the LOADV command is supposed to work in two ways- return the contents of a file to a variable or load directly into an array. However, anytime I try to load content into an array I get a “type mismatch” error. So, example. 'Does not work: DIM L0[0] LOADV “DAT:MAP_LAYER_0”,L0 'Does work: DIM L0[0] L0=LOADV(“DAT:MAP_LAYER_0”) From my understanding, both should work. Is this a case of bad documentation on the function, the function doesn’t work, or am I wrong in its usage? Posted Edited by kitesinpowerlines
  • #2 ✎ 1565 rando Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Third Year My account is over 3 years old Website Avatar Taboo I didn't change my avatar for 180 days Website I think the array needs to be 2D (or maybe 3D of you plug in x and y as separate dimensions) for SB4 map data, because of color data. Maybe try that. EDIT: uhh now I suddenly want to make a thing that can ignore color to save memory lol. I’ll probably be the only one who uses it lol Posted Edited by rando