Talk:Paprika
Paprika v 0.1.5 bug report = it tends to crash very often and randomly, mainly when using the window's menu. (Runtime error 13: Type mismatch)
My pc: Windows XP. .NET Framework 2.0
- Crypt -
- Hi Crypt, thanks for the bug report.
Could you try out some things and answer some questions for me? Thanks in advance.
- 1. Could you take a look at your region settings (Control Panel > Regional and Language options) and let me know what language it's set to. I've had problems in the past where people use a different system and it causes type mismatch errors. For example, if their decimal system is like 56,99 (French) and mine is 56.99 (United Kingdom). I need to figure out a way to make my application work universally.
- 2. I've uploaded a new version (0.1.6) which has a few differences:
- Increased debugging. If you click the debug menu item and then type "debug" at the prompt, debug mode will be enabled. It'll be a bit slower.
- The new character window is no longer loaded in the background when clicking the "Windows" menu.
- Removed the windows.ini file, which stores the position and size of windows.
- Some other unrelated updates.
3. If you could try that out and let me know where it crashes, that would be very useful to me. It would be best if you extract everything to a new folder. When it crashes you can see the last messages in the log.txt file either in the same directory as the application or the /Save/Character Name/ directory if you were playing a game.- Paprika is written in Visual Basic 6, so doesn't use the .NET FrameWork. Thanks again. Icey 20:14, 26 Sep 2006 (CEST)
- I've done some testing and I'm fairly convinced it's due to the language settings. For example, the experience rate of Monks in Paprika is a multiplier of 0.7 (for example, 20 xp would be converted to 14 xp), which in my language is equivilant to 0,7 in yours (I think). If I set my computers language to French, Paprika loads in 0.7 and can't converted that to a double variable, because it doesn't understand the ".".
- If you temporarily set your language to English (United Kingdom) and see if Paprika still crashes, that would be very useful to me.
- Possible solutions:
- A) I can get the language of the computer, so a little message could be shown if a user tries to open Paprika and they aren't using English (United Kingdom) or English (United States). But that's a rubbish solution because it alienates a lot of people and forces them to change their language to use the application. Most people would probably just delete it.
- B) Set the computer language to English. This is also a terrible solution. If an application did that to my computer I'd be very annoyed and uninstall it straight away.
- C) Set the language of Paprika to English. This is a good solution. It doesn't interfere with the users computer and they will never know it's happened, because it doesn't affect the user in anyway. So I tried this using SetThreadLocale, but I can't get it working yet.
- D) Write a few custom functions that understand numbers like 0.7, regardless of the language of the computer. This is a bit tricky, lots of work and some parts could easily be missed. I'm not sure it would solve the problem either.
- So I'll try to get C to work. Icey 21:34, 26 Sep 2006 (CEST)
- I've gone for option D instead. I just need to fix a bug that keeps freezing some parts of the code and then I'll upload a new version. Although I need to go to sleep now and then work tomorrow, so it'll be 18+ hours before I can do that :( Icey 22:56, 26 Sep 2006 (CEST)
What don't set, for instance, Monk xp modifier to 7 instead of 0.7 and Fighter's one to 10 instead of 1 (and make the needed and simple modification inside your code) ?
I did not make language switching in order to test it, but i think it's very weird and tricky to have to take into account this kind of conversion. IMO the way you read the ini files is the guilty one. You should check this before doing any x.y to x,y or whatever trapped and probably useless conversion.
Another thing :
If i were you i would convert Paprika to .NET. It would make future developement easier and i think the conversion will be easy. If you want you can send me your VB6 source project,i would try to convert it to .NET, just to see if it works. (cryptmaster@free.fr)
Crypt.
EDIT: i've just see the source was already available (i don't have VB6 so i didn't recognize the .vbp file) Well, so i have try converting it to VB.NET. Result : there are some expected errors (because the conversion modifies some arrays bounds declaration, IMO you should not declare (1 To x) arrays ) and some more interesting ones, for instance :
- in classCreature, line 403 :"Warning 16 Variable 'ShowEffects' is used before it has been assigned a value. A null reference exception could result at runtime."
- line 417 Warning 17 Function 'ShowEffects' doesn't return a value on all code paths. A null reference exception could occur at run time when the result is used.
- Line 252 Warning 3 Variable 'strOutputDamage' is used before it has been assigned a value. A null reference exception could result at runtime.
etc.
As the current VB6 0.1.6 version tends to crash (it freezes, i no longer get the "Type mismatch" displayed error) when i attack a creature maybe the line 252 error occurs (?).
VB2005 would be very usefull to you, IMO.
Crypt.
Hi Crypt,
Thanks for your reply. It's good that you no longer get that error, because hat means it must be the conversion thing, which is fixed now. Freezing when fighting happens to me as well, but I didn't notice because it only happens when the project is compiled. Running it from VB6 is fine.
There's a lot of decimal useds. On things like XP multipliers, gold, score, XP, item weights and so on.
I tried converting Paprika to VB2005 when it first came out. I didn't keep track of all the .NET things and I'm a little confused about what is available. After trying to convert I got hundreds of problems, so I didn't think it was worth converting. I haven't looked at the VB.NET/VB2005 things much, but I think I read somewhere that converting projects has been improved a lot.
I think it might be possible to use SharpDevelop to get VB.NET applications running on linux, which is definitely something that would attract me to using .NET. I have Ubuntu installed, so I could test that out.
I don't really want to buy anything, but I have a copy of VB2005 Express, which is free.
When I get home, I'll fix the freeze-on-fight bug, modify the arrays to start at zero, learn about the VB versions and then see how difficult it'll be to convert it.
Thanks again for your help. Icey 14:18, 27 Sep 2006 (CEST)