Hello, I need some help with an error that I have been encountering in my code. I started coding a few days ago but I have been working on someone else's game. For some weird reason when I call cartdata() in the init function and later in the update60() function I get a error "DGET CALLED BEFORE CARTDATA() IN _INIT LINE 287 (TAB 0) AT LINE 1 (TAB 3) you can see it for yourself if you run the game and chose "TIMED" and collect 25 flowers.
Credit to Lucatron for creating the base game: https://www.lexaloffle.com/bbs/?tid=36520
The cartdata() function is in init so I do not get why the error is occuring.
CARTDATA() expects a string argument. You're passing an uninitialized variable, so I think that's probably the issue. Instead of:
cartdata(mellow_time)
you probably want
cartdata("mellow_time")
with the quotes around the string (unless mellow_time is initialized somewhere and contains a string, but I couldn't find it anywhere else in your code).
[Please log in to post a comment]