Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / The Matrix1Utils plugins collection

Author
Message
ShaunRW
DBPro Developer
16
Years of Service
User Offline
Joined: 7th Jan 2008
Location: Brisbane, Australia
Posted: 31st Mar 2012 18:16
See i want to call functions through command line during runtime. So I don't know what function to call, let alone what type the parameters are. If I do it the way you are saying, then i would need to write a Call Function Ptr for every function i have, so i can use it at runtime. Something like this:


But if i do it the way i posted, every function i write will be instantly usable during runtime(no set up needed). I've actually got it working.

Sorry if you still don't understant what i'm doing, i suck at explaining things.

- ShaunRW

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 31st Mar 2012 19:18
Nope, no need to use CALL FUNCTION PTR for every command you provide.

What you need to think about is that every command you are providing already 'knows' what argument types it requires, then let it get them for itself.

Here's an example that puts the command-line arguments into a global array named ARGV, then calls the command and lets it sort out it's own arguments from the array:


The basic commands provided are:


You could go further and replace those INTVAL() function calls with your own functions that validate their input too.

ShaunRW
DBPro Developer
16
Years of Service
User Offline
Joined: 7th Jan 2008
Location: Brisbane, Australia
Posted: 31st Mar 2012 20:29 Edited at: 1st Apr 2012 05:17
Your code still requires functions to be specially written to work from command line. I want to be able to call any function. I don't see what's wrong with the code I posted, as it does what I want.
Sorry for the short reply, I'm on an iPod.

EDIT:
Oops, what i meant by command line was a type of 'in-game console', and not the CL$() function. Sorry about that.

I have posted the function i am using now, it is my own version of Call Function Name, except asks for ReturnType$,Format$,ArgList$.

As you can see, MyCallFunctionName can call any function in the code, with out needing them to be specially written for them to work. For example, i might have a function that changes the level, which gets called every time the player finishes a level. I want the ability to call this function and all other functions through the in-game console.

Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 7th Apr 2012 21:04
Ian,

Could you take a look at this post it concerns your Matrix1Util_05.dll having a conflict
with DBpro. Hopefully you will have some insight as to the bug.

http://forum.thegamecreators.com/?m=forum_view&t=195737&b=1

[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 22nd Apr 2012 01:30
IanM,

Here's another conflict. The following standard DBPro code causes a compiler parser error when your Matrix1Util_07.dll is installed. I guess it's your new version of the int() function that's responsible.



This was discussed on this thread (eventually ):

strange compiler error

I'd much rather you sorted out the DBPro cube mapping command though:

shadow mapping for two lights
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 23rd Apr 2012 15:10
@SITDS & GG,
I've got a few things on the list now - I'll try and spend some time getting them sorted out for you.

Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 10th May 2012 20:58
I have a slight problem with one of your commands: as far as I can tell, your "apply view matrix4" command has no effect.



Also, is there a reason why "SET VECTOR3 TO MATRIX4 ROTATION" is in degrees while "BUILD MATRIX4" works with radians?

[b]
GIDustin
16
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 11th May 2012 00:25
Ian:

I am using your DELIMIT CSV command and have come to a problem.


This crashes after the "wait key". On my server, which is constantly saving CSV files, it crashes very shortly after calling DELIMIT CSV on a string that contains a comma.

Any ideas?
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 23rd May 2012 15:58
I'm hoping to have a quick bug-fix release put out this weekend before I dive back into the DBP7.7 beta.

Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 23rd May 2012 18:27
Thanks Ian,

By any chance is the fix for the compatibility issue that I posted about going
to be in this release?

[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th May 2012 13:37
Yes. When I add the FIND FREE functions, they have to redirect a lot of internal commands to keep track of creation/deletion of the relevant resources. Although I've been pretty successful at it, I made one error when implementing the FIND FREE EFFECT function and its overriding of the LoadEffectEx function in plug-in number 5.


Release 20120527
Matrix1Util_05 - 1.1.0.10
* Fixed parameters to the redirected LoadEffectEx function.

Matrix1Util_07 - 1.1.0.10
* Renamed the INT function that accepts a double float to DOUBLE INT.

Matrix1Util_16 - 1.1.0.10
* Fixed buffer-overflow on DELIMIT CSV$ function, caused by incorrectly calculating the target string size.

Matrix1Util_22 - 1.1.0.16
* Added FILE IN USE function.

Matrix1Util_32 - 1.1.0.6
* Remove APPLY VIEW MATRIX4 commands - they can no longer work because DBPro continually regenerates the camera view matrix.

Attachments

Login to view attachments
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 27th May 2012 20:13
Quote: "* Remove APPLY VIEW MATRIX4 commands - they can no longer work because DBPro continually regenerates the camera view matrix."


I believe there's an override flag you can set to disable this, the same as for 3d objects?

[b]
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th May 2012 20:56
Yes there is, but the camera position and angles you can read/update via commands and function no longer reflect the same detail as the view matrix.

I plan on including commands in a future update to allow you to set and unset the view matrix properly, but this was just a quick bug-fix.

Derekioh
15
Years of Service
User Offline
Joined: 1st Feb 2009
Location:
Posted: 19th Jun 2012 08:06 Edited at: 19th Jun 2012 08:28
whats the difference between update and append for the FIle I/O?

Oh and how do you find a sub string and put your position there?

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 19th Jun 2012 16:18
Quote: "whats the difference between update and append for the FIle I/O?"

When a file is open in append mode, ALL writes automatically appear at the end of the file, no matter where you set the current position.
When it's open in update mode, writes take place wherever the current position is set in the file.

Quote: "Oh and how do you find a sub string and put your position there?"

It's a file, not a database, so you need to search for the data yourself.

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 12th Aug 2012 13:03
Anybody else notice this thread hit its 6th year birthday a few weeks ago?

Congrats IanM!!!

GIDustin
16
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 22nd Aug 2012 19:17 Edited at: 24th Aug 2012 20:23
Ian,

Quick question about your draw to image commands. I am currently creating an image and drawing to it, and then I want to send it to the printer using DarkInk. Here is some sample code:



It crashes on MAKE MEMBLOCK FROM IMAGE mem_no,ImageNo because the "image is currently locked".

Is there a way to unlock an image?

Edit: I got around the problem by using paste image / get image to create a copy of the image, but still would like to know if there is an easier way.

Edit2: This only works if the image you are printing is smaller than your screen as "get image" fails if you try to capture more than what is on the screen. Still need a way to unlock images.
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 2nd Sep 2012 01:28
I recently came across something that doesn't seem quite right about the functions make object plain and make object plane.
The documentation for these clearly states that they allow no more than 65536 vertices. Fair enough, so that should be a 255 by 255 column/row plain. However the function fails and reports that "the number of indices must be less than or equal to 65536" if using 105x105 tiles or higher. (It actually can do 105x104 or something, which is even weirder because that certainly isn't close to breaching 16384 (128x128), 32768 or anything similar).

So either there must be something wrong with the documentation; I don't think that's the case though, or the implementation here.

Some code for reproducing the issue:


This is using the 2012-05-27 version by the way, which I believe to be the latest one.


"Why do programmers get Halloween and Christmas mixed up?"
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 2nd Sep 2012 10:29 Edited at: 2nd Sep 2012 10:30
255 x 255 is not possible (255*255*6 = 390K). You have to multiply each tile by 6: 2 triangles * 3 vertices. That allows...104x104

Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 2nd Sep 2012 13:06
Ah... but then it's the index count rather than the vertex count that can't exceed 65536 isn't it?

I guess I was throwed off by this line from the documentation:
Quote: "Any plain created can only have up to 65536 vertices or the command will fail. The number of vertices is calculated as (Columns+1)*(Rows+1)."


Oh well, thanks for clearing it up


"Why do programmers get Halloween and Christmas mixed up?"
GIDustin
16
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 10th Sep 2012 06:44 Edited at: 10th Sep 2012 06:45
IanM,

In addition to being able to unlock images as stated in my post above, I have another problem I came across that I am not sure how to fix.

I have a CSV file with 82090 lines. I loop through it as follows:



It throws one of those "has encountered a problem and needs to close". Looking at the UpdateLog, it starts to split a string but never gets to the OK line, leading me to believe it is the split csv string command. It usually crashes after parsing around 50,000 lines, and it hasn't crashed on the same line twice.

Could there be a memory issue with that command or something? I know you looked at it earlier and fixed some bugs for me, but maybe another slipped through.

Also, I don't think I thank you enough for these DLLs. I find myself using commands from them in almost every function I write...
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 10th Sep 2012 23:44
Can you post (or email if it's easier) an example file that this happens on?

I've also looked into your MAKE MEMBLOCK FROM IMAGE issue, but I have been unable to come up with a solution - the image is locked because DirectX has rendered to it, not from anything within DBPro. I'll keep mulling it over.

Quote: "Also, I don't think I thank you enough for these DLLs."

You're very welcome.

GIDustin
16
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 10th Sep 2012 23:57 Edited at: 11th Sep 2012 00:33
IanM,

GoDaddy was hacked today, but with any luck you should have the project file in your inbox.

Attachments

Login to view attachments
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th Sep 2012 00:18
There's nothing in my email or spam folder.

GIDustin
16
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 11th Sep 2012 00:32 Edited at: 11th Sep 2012 00:33
First email didnt go through due to godaddy. Second email didnt go through because gmail doesnt like people attaching exe files. I have attached the project here.

Attached is a RAR file containing the project, the compiled EXE, and the
CSV that I am using. For me, it always throws an error like the one in the
screenshot.

When I recreated the project with much fewer lines to send to you, I did
have it successfully complete once, but it was when logging was on (two
entries into a log file for each line) and it took forever to complete.

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 12th Sep 2012 21:33
@GIDustin,
I did eventually get your email - I guess its size delayed it.

Anyway, I can't reproduce your problem, either with your exe, or when I recompile on my system. I've checked your exe, and I see you are using the latest version of the plug-in.

I am using RC 7.7 - your version may be different, so that could be causing the problem. If you let me know your version, I'll regress and try again.

GIDustin
16
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 12th Sep 2012 22:05 Edited at: 12th Sep 2012 22:50
@IanM,

I am using 7.7 as well. I have attached a copy of the details of the error window in case that helps.

I also noticed something else. I wanted to run it a bunch of times and compare the spot where it crashes, so instead of outputting to a logfile, I just added write to clipboard d$ before the endwhile and it hasn't crashed at all with that change. I take the clipboard command out, and it crashes every time...

I then moved the clipboard command to the end of the file, and it still works.

My theory: Your Matrix16 requires a DBPro DLL (the one containing the clipboard command), and my project didn't include it because it thought it wasn't needed.



Edit: That may not be the problem after all. The code I attached was a small portion of a larger project. Adding the clipboard command to the larger project does not stop it from crashing.

Edit2: In my example code, I am reading word 1, then 3, then 2. I changed the order to 1, 2, 3 and it appears to be working again. Does the order in which you read the words matter that much?

Edit3: It still crashes on occasion. Gah!

Edit4: I am going for an Edit record here. The problem almost has to be with split csv string. I replaced the split csv string with the code below, and I am error free.

Attachments

Login to view attachments
Kiaurutis
13
Years of Service
User Offline
Joined: 19th Jan 2011
Location: Lithuania
Posted: 1st Oct 2012 23:19
This is crazy big and useful project. Looks like you rewrited whole DBP language Hope you will release IanMPro language in the future, which is much faster, useful and bug-free than DBP
Thank You IanM

Join The dark Side! We have cookies
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 17th Oct 2012 16:32
@ IanM,

Just to mention I'm now using your Lookup commands. They're fast and flexible - just the job!

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 21st Oct 2012 18:53
Hello Ian, I hope all is well. Thanks once again for this important plugin library.

I am creating a colour pallete using your colour conversion commands, but I can get my RGB colour into an HSV/HSL packed DWORD but cannot seem to get HSV (or HSL) values back into the correct RGB colour; it appears to me that the following code should output the same RGB results, but the original packed RGB colour value is different from the converted version.

I need to provide HSV/HSL sliders in addition to RGB sliders in my colour palette.

Any ideas what I am doing wrong:



sladeiw
15
Years of Service
User Offline
Joined: 16th May 2009
Location: UK
Posted: 22nd Oct 2012 11:02
Where does the capital V# variable come from? I changed that to match the others (d) and it gave what looked to me like the right result, although I have to admit it does my head in dealing with HSV.



Hope it helps
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 23rd Oct 2012 02:55
Yeah thanks for spotting that mistake. I don't know why I wrote that last print statement either.


Now the returned values are accurate enough (just one unit brighter in the green channel). This will now provide me with what I need to produce the colour palette dialog.

Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 27th Oct 2012 01:17 Edited at: 27th Oct 2012 01:18
long overdue, ianm.

Virtual Nomad @ California, USA . DBPro V7.7
AMD Phenomâ„¢ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM
ATI Radeon HD 3650 @ 512 MB . Vista Home Premium 64 Bit
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 28th Oct 2012 22:45
Cool, thanks for the nomination

I'm hoping to spend a little more time on the forums and in development in the near future - lot's of little things that have been using up my time and energy are starting to die away now, so I can get back to doing what I want to do.

@GIDustin,
I have never been able to reproduce your problem. I've just thought of one thing you can try - take a copy of the runtime DLLs from the link in first post in this thread, drop them into your exe directory and see if that solves the problem.

Manson_NS
20
Years of Service
User Offline
Joined: 4th May 2004
Location: Denmark
Posted: 8th Nov 2012 22:09
I feel kinda bad pointing at potential errors, but app. 90% of my code wouldn't work without the Matrix1 plug-in, so odds are any potential errors will be spotted

COPY BANK Bank Number, Start Position, Size, Target Position - does not work, it insists on the Target Bank beeing indicated as well - the helpfile says differently.

Suggestion: Could replace all$() possibly have an optinal flag for whether the part of the text that has been replaced should be searched again? (ie: if I wanted to remove empty 'space's in the start of a line, I'd say replace all$("Hello,"chr$(10)+" world",chr$(10)+" ",chr$(10)) - to have it return "Hello "+chr$(10)+"world" as it should continue to replace chr$(10)+" " with just chr$(10)
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 9th Nov 2012 23:33
Thanks for the report on COPY BANK - the command was planned and added to the help files, but it seems I simply didn't implement it. I'll make sure it's added to the next release. In the meantime, the other version of the command will work correctly and safely if the source and target banks are the same.

I can't safely implement your suggestion for REPLACE ALL$ as it could result in runaway memory usage until the program crashed out. For example, if you have a string containing "a", and then carried out a REPLACE ALL$ of "a" with "aa", then "a" would be replaced with "aa", then the first "a" would be replaced with "aa", then the first "a" would be replaced with "aa"... ad infinitum, one character at a time.

For your particular problem (leading spaces on multi-line strings), I'd suggest using the SPLIT STRING command using the chr$(10) as the delimiter, then rebuild your string line by line, stripping leading zeros:


I used the ~ character as the separator so you can see the effect visually, but it works just as well with chr$(10) (or lf$() )

Manson_NS
20
Years of Service
User Offline
Joined: 4th May 2004
Location: Denmark
Posted: 10th Nov 2012 17:17
Yea, I'm aware that it might run loose, but as with everything else, I'd say that's for the programmer to avoid.
I am currently just using

Anyway, thanks for you response, I'll edit your code and make a speed compairasont between the two methods.

I'm just gonna use this oppotunity to thank you for great work, and say that I for one am looking forward to any updates you might come up with
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 12th Nov 2012 16:44 Edited at: 12th Nov 2012 16:46
Your Object Group commands are really useful Ian. However, do you have any tips on categorizing objects?

An object can only be in placed one group, as it stands; but it would be great if objects could be categorized in a number of groups. For example, a door could be in a room group, and categorized as part of the door group. If I put the door in the door group; it is no longer part of the room group; even though its still physically in the room.

Sometimes, one wants to categorize objects by statistics; such as object groups for objects near the camera, another group for objects that moved. To put the door in such a group, requires you to store its original group in memory, and put it back again once finished with the task.

There is no object arbitrary value command for regular objects (only static objects). That would be an alternative solution since objects can be categorized with that value; no need to use redimension arrays. Storing a category in an array is not good; because if you create an object with a high ID, the array needs to be dimensioned to that size; using a dynamic approach (with 'add to stack') means you'd have to search the array for the object's category. - The same applies to limbs, sprites and images I guess.

Let me know your suggestion.

Manson_NS
20
Years of Service
User Offline
Joined: 4th May 2004
Location: Denmark
Posted: 13th Nov 2012 09:12
Is the data pointer to the vectors available somewhere, or should I put this on request form?
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 14th Nov 2012 20:41
Quote: "Yea, I'm aware that it might run loose, but as with everything else, I'd say that's for the programmer to avoid."

I don't mean 'throw out an error', but an actual windows exception message box that may give no indication of what the problem actually is.

There's no way to get a pointer to a vector, as the official plug-in containing the vector commands does not provide it in any way.

@Chris,
There are a few methods I can think of without adding new commands.

One idea is to use an array of strings to hold your grouping, with one entry in the array for each group, and the string holding the object ids:


I'm using STR$() and INTVAL() here to do the encoding/decoding, but you could do something a little cleverer such as encoding in base 255 or something similar.

Another alternative is to use an array of a type with 2 integer fields, keep it sorted, and use binary searches to locate the groups and items within the groups.

Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 15th Nov 2012 10:49 Edited at: 15th Nov 2012 10:51
Thanks for the tip. I'll use it, plus it helped me to think up another solution, which is to store function names in an object string to be used as classification, and call those functions on the given object.



It could be speedier with storing pointers, but more difficult to read and debug.

Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 19th Nov 2012 00:57 Edited at: 19th Nov 2012 16:59
is there anything here (or via standard windows DLLs) that would return the absolute path of a running executable given its handle? ie, the location where the .exe resides/was launched from?

desired usage example:

fullpath$ = get launch path (handle)

any guidance here is appreciated

Virtual Nomad @ California, USA . DBPro V7.7 . Matrix1Utils (05.27.12)
AMD Phenomâ„¢ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM
ATI Radeon HD 3650 @ 512 MB . Vista Home Premium 64 Bit
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 10th Dec 2012 12:20
If I run this little piece of code the printed list on screen will always be missing the first letter. If I put in another text,0,0,"string" before the list, then it will be that string that is missing the first letter. If I remove call function name command from the code, no letters are missing. Is this a possible bug in Matrix1?



The byte chrunchers are coming...
DIVIDING BY ZERO/BECAUSE WE SUCK...
Jeff Miller
19
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: New Jersey, USA
Posted: 10th Dec 2012 15:43
Interesting. I get the same error if I sub "Set cursor 90,y : print file_list$(t)" for "text 90,y,file_list$(t)", so the bug does not lie in the Text command.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 10th Dec 2012 18:27
Strange - when I run the code, the first letter flashes in and out of existence. It doesn't coincide with the refresh rate either. I'll take a look to see what's happening.

@Virtual Nomad,
DIR EXE() gets you the executable's directory

Jeff Miller
19
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: New Jersey, USA
Posted: 12th Dec 2012 00:38
If it helps any, I get the flashing you describe only if I substitute fastsync for sync. It proves, for what it's worth, that the value in memory of the printed expression has not been affected, only it's display.
Grasmann
16
Years of Service
User Offline
Joined: 1st Sep 2008
Location:
Posted: 15th Dec 2012 19:49 Edited at: 21st Dec 2012 12:48
Hey IanM,

since I'm using your Datafiles I managed to destroy my filesystem twice XD.

I'm pretty sure it was caused by the Datafiles, because I made a programing-pause until yesterday and today the filesystem was destroyed again .

I'm using Windows 8.

Can you think of any scenario where this could happen?

For example should I always use "DATAFILE FLUSH" to make sure the file was saved to disk before the program ends? >_>

EDIT:
I guess I will set the flush mode to 1 for all files I'm opening for write operations. Maybe that will fix it. XD

EDIT2:
I haven't tested it again until now.
The strange thing is ... I'm doing none of the datafile operations on my main disk ( Windows 8 disk ) ... and still it fails to boot. XD

Well, I could repair it both times.

I think I might have tried to create a folder that was already there, but that shouldn't be the problem. I also created empty datafiles several times, while testing.

EDIT3:
The problem isn't "solved", yet.
I haven't encountered it again, since I haven't programed since the lahst time it happened, but I had some other problems with Windows 8 in the meantime and switched back to Windows 7.

I'll test around and I will let you know if the problem here was actually Windows 8 XD.

EDIT4:
It looks like my problems could really be caused by Windows 8.
Apparently Windows 8 still has a lot of problems.
Windows 8 Forum - Search "file system"
Windows 8 file system errors on data disk(s)
( Although this one looks solved, because there's an "answer" presented, it doesn't seem solved if you read the last few posts XD )

However, since I installed Windows 7 again I will test my program again. I guess I will just create a sh*t-load of files and see if anything bad happens to the file system.

But it sure seems to be a bad idea to use Windows 8 right now. XD
GIDustin
16
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 21st Dec 2012 19:18 Edited at: 21st Dec 2012 19:19
IanM:

Your plugin is crashing after using some Styx commands. Is it something with your DLL or theirs? The code below crashes for me.



Attachments

Login to view attachments
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 21st Dec 2012 19:22
GIDustin, just rename that mentioned 20.dll and re-run your code... if your project does not use any STYX functions just remove it from the directory or rename it with an underscore like _this.dll...

Usually fixes the issue... Basically STYX and M1U use similar commands and functions... hope this helps...

GIDustin
16
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 21st Dec 2012 19:27 Edited at: 21st Dec 2012 19:29
Quote: "GIDustin, just rename that mentioned 20.dll and re-run your code... if your project does not use any STYX functions just remove it from the directory or rename it with an underscore like _this.dll...

Usually fixes the issue... Basically STYX and M1U use similar commands and functions... hope this helps..."


I know that Styx and Matrix disagree on some commands, especially with trim$, but I always just ignore the compiler error and keep going. Matrix 20 has the function pointer commands. EXECUTE SAVE DIALOG is a Styx command. To run the code above, I need both DLLs to play nice with each other. My guess is that there is some memory collision between the commands, and I would also guess Styx is to blame, but I think I would get faster responses from IanM than from Styx support.

Edit: Also, the code runs fine until it gets to the second call function ptr command. That is why I am guessing the Styx command messed with something that causes Ian's command to fail.

Login to post a reply

Server time is: 2024-11-23 09:40:09
Your offset time is: 2024-11-23 09:40:09