Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Apr 18, 2024 9:19 am
All times are UTC + 0
SHP Engine error
Moderators: Community Tools Developpers
Post new topic   Reply to topic Page 1 of 1 [20 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
comrade
Vehicle Driver


Joined: 19 May 2005
Location: In a pub, next to a mug o' beer

PostPosted: Thu Jun 09, 2005 7:58 am    Post subject:  SHP Engine error Reply with quote  Mark this post and the followings unread

I've found an old error of the SHP engine (both 1.8 and 2.2 have it). It refuses to open any READ-ONLY file. Will be there any solution for this?

Back to top
View user's profile Send private message Visit poster's website
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Thu Jun 09, 2005 2:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

This problem doesn't happen on Win98se, as far as I could test it here. I've made my engineer read-only and it still opened.

_________________


Mods, Mods Support, Public Researchs, Map Archives, Tutorials, A Friendly Community and much more. Check it out now!

Back to top
View user's profile Send private message Visit poster's website Skype Account
Havoc
Commander


Joined: 04 Jan 2005
Location: Toronto, Canada

PostPosted: Fri Jun 10, 2005 8:36 am    Post subject: Reply with quote  Mark this post and the followings unread

What the hell? These tools work better on Win98 than XP?
Banshee you should test these programs on WinXP too. Yeah, you have only 98 (<-shit), but give them to someone that has XP.

Back to top
View user's profile Send private message
comrade
Vehicle Driver


Joined: 19 May 2005
Location: In a pub, next to a mug o' beer

PostPosted: Fri Jun 10, 2005 11:32 am    Post subject: Reply with quote  Mark this post and the followings unread

Yeah, here I'm, who's programming @ WinXP

Back to top
View user's profile Send private message Visit poster's website
Havoc
Commander


Joined: 04 Jan 2005
Location: Toronto, Canada

PostPosted: Fri Jun 10, 2005 11:54 am    Post subject: Reply with quote  Mark this post and the followings unread

Don't look at me. I'll learn programing next year at school and only the basics.
Hmm, now I'm experiencing that problem with SHP Builder and Read-Only files. It worked fine on Win98.

Back to top
View user's profile Send private message
C&CVK
Guest




PostPosted: Mon Jun 12, 2006 2:32 pm    Post subject: Reply with quote  Mark this post and the followings unread

Havoc wrote:
Don't look at me. I'll learn programing next year at school and only the basics.
Hmm, now I'm experiencing that problem with SHP Builder and Read-Only files. It worked fine on Win98.


Don't write any on DEPHI
write on C or Assembler - it's better!


To Command and Conquer

Back to top
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Mon Jun 12, 2006 3:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

Assembler? For making programs is a pile of crap. It's good to hack existing stuff that you don't have the original source code.

For simple programs with windows looking interface, Delphi is very objective. Visual C++ is also a fine option, but a bit more burocratic.

ANSI C is only recommendable to DOS Prompt stuff, honestly.. it sucks. Bad support to string, bad memory management and other terrible things. Use C++ instead.

Back to top
View user's profile Send private message Visit poster's website Skype Account
stucuk
Geek


Joined: 27 Aug 2002

PostPosted: Mon Jun 12, 2006 11:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

There can be problems when you don't set the opening type. For reading only you should make it set to the value for only reading, this will get around any read-only problems.

Basicaly defaultly its set so the file is opened Read-Write, and even if you only want to read a file the computer doesn't know this and can throw up a read-only error. Tho why you would make SHP files that are read-only is beond me.

P.S taken from delphi's help:

Quote:
Warning: The default value of FileMode is 2 (Read/Write access). If this is not changed to a read-only file mode before calling Reset, attempts to open read-only files will fail.

_________________
Free Map Editor - Game Requirements - Stucuk.Net

Back to top
View user's profile Send private message Visit poster's website
VK
Pyro Sniper


Joined: 28 Jul 2005
Location: in GAMEMD.EXE

PostPosted: Wed Jun 28, 2006 9:22 am    Post subject: Reply with quote  Mark this post and the followings unread

Banshee wrote:
Assembler? For making programs is a pile of crap. It's good to hack existing stuff that you don't have the original source code.

For simple programs with windows looking interface, Delphi is very objective. Visual C++ is also a fine option, but a bit more burocratic.

ANSI C is only recommendable to DOS Prompt stuff, honestly.. it sucks. Bad support to string, bad memory management and other terrible things. Use C++ instead.


All problems - from Delphi Sad
If you write SHP Builder on C using Win32 API it work better Smile


Warning: The default value of FileMode is 2 (Read/Write access). If this is not changed to a read-only file mode before calling Reset, attempts to open read-only files will fail.

don't use it -- use it Exclamation

HANDLE hFile;
DWORD dwRealRead;

hFile = CreateFile(lpName, GENERIC_READ, FILE_SHARE_READ,
0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,0);
if (hFile==INVALID_HANDLE_VALUE)
{
// Error
}
ReadFile(hFile,&shpPal,sizeof(SHPPALETEENTRY)*256,&dwRealRead,0);
// anything
CloseHandle(hFile);

without any problems

Back to top
View user's profile Send private message Skype Account
John Galt
Commander


Joined: 01 Aug 2003
Location: Galt's Gulch

PostPosted: Wed Jun 28, 2006 4:38 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yay, this community really needs another holy war.

Back to top
View user's profile Send private message Visit poster's website Skype Account
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Wed Jun 28, 2006 4:43 pm    Post subject: Reply with quote  Mark this post and the followings unread

I don't like ANSI C. It doesn't have a good memory management. I mean, never trust malloc. It sucks big <insert any insult here>.

C++ sorts these problems with many data structures like vector, list, etc..

Back to top
View user's profile Send private message Visit poster's website Skype Account
ChielScape
General


Joined: 07 Mar 2006
Location: In ur BIOS, Steeln ur Megahurtz!

PostPosted: Wed Jun 28, 2006 7:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

why don't you both use what you want and stop whining?

_________________
Please, read the signature rules of the forum.

Back to top
View user's profile Send private message Send e-mail Skype Account
stucuk
Geek


Joined: 27 Aug 2002

PostPosted: Thu Jun 29, 2006 5:53 am    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
If you write SHP Builder on C using Win32 API it work better


Welcome Noob. Please take a seat. FYI C/C++ doesn't work better than other languages. I know this is a large shock hence why i asked you to take a seat but C/C++ supprisingly isn't the best language. There is actualy several different languages which are at the same level.

I know its a large shock for C/C++ Fanboys to hear but its 100% True.

The ReadOnly problem(Which delphi is actualy handling correctly since opening a file with Read/Write properties that can only be Read means that it has to fail. Since you can't write to it) is simple to solve as i said u just use FileMode := 0; b4 reseting the file and then use FileMode := 2; at the end of the procedure/function. Now this is very hard to do. I mean setting a varible from the default value of 2 to 0..... Delphi will struggle big time with this ..... i dread to think of the speed. I mean setting one varible in delphi must = 1000 varible changes in C/C++ due to it being the best ever.

Note: No Sarcasum Was Hurt In The Making Of This Post.

Quote:
Yay, this community really needs another holy war.

What War. A war implys that 2 sides fight it out. All i see is one side. The other side has no clue about Delphi and thus can't be counted.

P.S if you want to talk about which language is better you actualy need to have used both languages. You can't just quote from the C/C++ FanBoy manual.

_________________
Free Map Editor - Game Requirements - Stucuk.Net

Back to top
View user's profile Send private message Visit poster's website
VK
Pyro Sniper


Joined: 28 Jul 2005
Location: in GAMEMD.EXE

PostPosted: Fri Jun 30, 2006 11:29 am    Post subject: Reply with quote  Mark this post and the followings unread

I have not told that With C++ better Delphi as language Exclamation
As language Delphi = C++
I don't like any VISUAL LIBRARIES (such as MFC, VCL and another)
Only Win32 API is good Smile

Back to top
View user's profile Send private message Skype Account
Havoc
Commander


Joined: 04 Jan 2005
Location: Toronto, Canada

PostPosted: Fri Jun 30, 2006 3:13 pm    Post subject: Reply with quote  Mark this post and the followings unread

Although I'm still a total newbie in programming because I didn't do big deal at school (at least I didn't get to do the pascal lessons, yuch) I'm not really a fan of C++ from what I seen. I really like to see even new programs that work fine and suddenly: C++ error and bla bla and then restart the PC... Also C++ looks complicated. From what I heard Delphi is the best choice for anyone, but I'm still in unknown territory.

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Fri Jun 30, 2006 6:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

C++ is really harder than Delphi to track bugs on the code, specially linking problems.

Back to top
View user's profile Send private message Visit poster's website Skype Account
VK
Pyro Sniper


Joined: 28 Jul 2005
Location: in GAMEMD.EXE

PostPosted: Fri Jun 30, 2006 7:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

Banshee wrote:
C++ is really harder than Delphi to track bugs on the code, specially linking problems.

Errors are everywhere: (
In Delphi the majority of errors show Error box and continue to execute program
About bug track...
If you have a good debugger --- bugs are die Smile

Back to top
View user's profile Send private message Skype Account
stucuk
Geek


Joined: 27 Aug 2002

PostPosted: Sat Jul 01, 2006 4:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
As language Delphi = C++


Delphi isn't C++.

The Delphi application may have been made with C++. But the code is compiled into machine code (AKA Binary). The same as what C++'s compiler does.

Quote:
In Delphi the majority of errors show Error box and continue to execute program


In Delphi its upto the programmer to check to see if there is errors. Otherwise u generaly get a AccessViolation.

Quote:
From what I heard Delphi is the best choice for anyone


IMO if a person has to choose between Delphi and C++ id recommend Delphi. Only because the code is easyer. Pascal is simpler to look at, to write and to learn than C.

_________________
Free Map Editor - Game Requirements - Stucuk.Net

Back to top
View user's profile Send private message Visit poster's website
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Sat Jul 01, 2006 6:35 pm    Post subject: Reply with quote  Mark this post and the followings unread

I prefer VCL over MFC. But I prefer C++ over Delphi's pascal. C++ is great due to the most usefull data structures being implemented by default and it's easy to deal with them using iterators. When I need to use a list or a binary tree on Delphi, I need to create a whole new class to support it properly. C++ already has a template for them.

Back to top
View user's profile Send private message Visit poster's website Skype Account
stucuk
Geek


Joined: 27 Aug 2002

PostPosted: Thu Jul 06, 2006 11:13 am    Post subject: Reply with quote  Mark this post and the followings unread

All you need to do is make a class once and use it in every case. (making child classes where needed)

PPL are lazy.

_________________
Free Map Editor - Game Requirements - Stucuk.Net

Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [20 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1810s ][ Queries: 11 (0.0083s) ][ Debug on ]