|
Post by XD138 on Jan 17, 2008 18:21:55 GMT -5
|
|
|
Post by Mairtrus on Jan 18, 2008 10:14:06 GMT -5
Wow, you are right. I never had noticed, but BEX v1.00 has some problems when they include 2 or more functions/subs in the same code. Perhaps Devster can give us a specific answer.
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Jan 19, 2008 14:53:38 GMT -5
shoot, that's not good, that you can only have one sub/function i'll look into it
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Jan 23, 2008 12:37:49 GMT -5
Okay, I don't know what you guys are doing x.x Having more than one sub or function is working perfectly for me with the v1.00 compiler. Please post some code that breaks the basiegaxorz compiler. And make sure you are using the lastest compiler v1.00 from the "merry christmas" thread (hasn't been updated since 12/25/07). Here's my code: print blah(" has printed this!") print asdf(" is different!")
declare function blah(a$ as string) as integer print "function 1"; a$ return 45 end function
declare function asdf(a$ as string) as integer print "funcrion 2"; a$ return 23 end function It's working for me It prints: function 1 has printed this! 45 function 2 is different! 23
|
|
|
Post by XD138 on Jan 23, 2008 22:32:02 GMT -5
Here's my "faulty code" : Dim param1& as Long Dim param2% as Integer Dim param3$ as String*4 print "From GUIDE function:" guide &h0a86, 128, "true" print "From OTHER function:" other &h0000, 96, "Inp:" Declare Function guide(param1&, param2%, param3$) print param1& print param2% print param3$ End Function Declare Function other(param1&, param2%, param3$) input param3$, param1% print param1% End Function
I click "Compile..." and it hits me with a SEGA GENESIS TINY BASIC COMPILER HAS ENCOUNTERED A PROBLEM AND NEEDS TO CLOSE. WE ARE SORRY FOR THE INCONVENIENCE. error...
|
|
|
Post by XD138 on Jan 23, 2008 22:47:34 GMT -5
Here's my "faulty code" : [tt] Dim param1& as Long Dim param2% as Integer Dim param3$ as String*4 print "From GUIDE function:" guide &h0a86, 128, "true" print "From OTHER function:" other &h0000, 96, "Inp:" Declare Function guide(param1&, param2%, param3$) print param1& print param2% print param3$ End Function Declare Function other(param1&, param2%, param3$) input param3$, param1% print param1% End Function
I click "Compile..." and it hits me with a SEGA GENESIS TINY BASIC COMPILER HAS ENCOUNTERED A PROBLEM AND NEEDS TO CLOSE. WE ARE SORRY FOR THE INCONVENIENCE. [/tt] error... [/quote] I meant ;D: Declare Function other(param1&, param2%, param3$) input param3$, param1 &[/n] print param1& End Function
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Jan 24, 2008 12:41:32 GMT -5
Okay, I see the problem now, in the v1.00 binary. When you declare one function that has more than 2 parameters, the program will compile OK. When you declare more than one function with 1 or 2 parameters, the program will compile OK. When you declare more than one function, where any one of those functions uses more than two parameters, the program will crash. I doesn't do this to me in the latest release. I didn't fix the bug at all x.x, but I think the bug still exists. Maybe the v1.00 version compiled wrong? If this is the case, and there's really no bug in the actual source, then I'll probably have to get all the bugs already known fixed from the next release, and release the next release early to test some more. EDIT: bex could also use some better documentation . If anyone feels like thay're up for the challenge, please feel free to make some documentation. Like introducing newbies to tiles+sprites, or the new function/sub stuff.
|
|
|
Post by Mairtrus on Jan 25, 2008 9:32:56 GMT -5
bex could also use some better documentation . If anyone feels like thay're up for the challenge, please feel free to make some documentation. Like introducing newbies to tiles+sprites, or the new function/sub stuff. I can do part of that. Lately I have been working on **super secret project** and I have developed many skills to manage tiles/sprites, as well as some subs to rotate tiles at real-time and manage compressed graphics. I need some time (maybe 5 days) to write and upload them to the forum, because I have a lot to study (fu**ing university ...)
|
|