VCC Isn't Compiling SYSTEM.VC
Displaying 1-11 of 11 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Vylrath

Okay, I downloaded and installed the Windows 2.5 beta version, and went through the tutorial again. I did like the tutorial said and created a blank text file called SYSTEM.VC. I then typed in "vcc system" and it spat out an error:

"DOS/4GW fatal error (1007): can't find file SYSTEM.EXE to load"

So naturally I decided to try typing "vcc system.vc". Here's the error I got this time:

"DOS/4GW fatal error (1008): can't load executable format for file SYSTEM.VC [1]"

What am I doing wrong? This is getting kinda annoying ... I'm so used to RPG Maker 2000 doing everything for you ;-) but I really want the flexibility of having a programming language being usable behind the game.



Posted on 2002-01-23 23:05:54

Omni

It's a runtime loader or whatnot VCC requires. You can get it at the Vergesource under Files-Engine Files, I think. Take DOS4GW when you find it and put it in your Windows directory, so that it is automatically called. Otherwise, you have to type:

DOS4GW.exe VCC.exe system.vc

Just put it in the Windows directory and run VCC again.



Posted on 2002-01-24 05:58:28

Vylrath

I got it to work by using "dos4gw vcc system.vc" instead of "vcc system.vc" with dos4gw in the same directory.

Now I have to actually start writing code. This is going to be next to impossible ... I have tons and tons of BASIC experience (I can program an entire RPG in BASIC from scratch), but I really don't know much C/C++ except the basics: looping, branching, etc, the stuff you learn in high school programming.

I wish there was a nice tutorial on how to get started ... the tutorials under the "tutorials" section don't really do it for me. Is there anything you think that I should download so that I'll have some sample code to look at? Or is there a better tutorial on how to create sprites and draw them on the screen? I don't know simple stuff like that, let alone tile-by-tile scrolling.



Posted on 2002-01-24 07:55:37

Vylrath

I looked down at some other posts and someone had a very good tutorial that got me started ...



Posted on 2002-01-24 11:23:41

Omni

I don't know about that. I still can't draw or anything, but you just need a common vision of your RPG to start, I guess. As for music, or pixel art, use the CHRmak series of programs and whatnot, and for music, Verge uses .mods, .s3ms, .xms, and something else, I think, anyway, you can use Modplug Tracker (www.modplug.com) to create music. Highly recommend you download their quick start kit or whatever, as it explains how it works.

For programming, well....All I can say is, you must know how to use variables, but do you know how the C structure works? Everything is in functions. you can declare functions, like so...

void {name}(arguments)

so I could create a function like

void text(string a)

where string a is an argument I will create. Any argument that uses a variable will be defined, so you do not have to declare it in code. For example,

void text(string a)
{
MsgBox(" " & a & " ", 100);
}

where MsgBox is a verge2 function that displays a message. I pass the argument, a, to it, and I add 100 as an argument to MsgBox, where 100 is the number of ticks (in hundreths per second) that I want the message to remain on screen. Once you declare a function, you can "call" it at any time, like this:

text("What are you doing?");

and it would work. To declare stuff, besides, functions, there are integers, and strings, declared like so:

int name;
string name, name2;

You can separate them by commas. Integers are numbers, strings are alphanumerical (duh.). You can also declare arrays, you studied those, right? The groups of variables, like so:

int name[slots];
or
string name[slots];

so I could type

int HP[4];

where 4 is the number of slots the array holds. Each one can hold a separate number. All slots are initialzed as zero if they are integers, and blank if they are strings. You could assign them a value at declaration, like this:

int versionnumber=2;

Verge integers cannot handle floating point, last I checked, so no decimals.

Arrays always start at zero, so if I declare int HP[4] I then have to start assigning values like so:

int HP[4];
HP[0]=200;

and whatnot. All lines in VergeC and real C code end in a semicolon ";".

int name;

If a function has no arguments then just use parentheses, like

void Exit()
{
Exit("This game has terminated.");
}

When you declare a function, its code is encased in brackets. Verge does not support object-oriented programming (though there are workarounds, I think...)
There are no semicolons on the line after the declaration of a function, like

void Exit(); ----this is wrong.

Notice the "void"? There are two types of functions. Ones that return values and ones that don't. A function beginning with int returns a value, like the Cachesound function.

With Cachesound, it loads a file into RAM and gives you the memory address for it. So to play a sound, try this:

Int pointer;
pointer = Cachesound("dong.wav");
Playsound(pointer, 120, 60);

where pointer is the pointer to the file in memory, 120 is the center between stereo speakers (I think), and 60 is volume.

Like I said, all VergeC is in functions. If you are using Winv2 or V2.5, then at the start of your system.vc you need an autoexec() function, which is like a startup script.

void autoexec()
{
// insert whatever startup code here.
}

"//" denotes short one line comments.

*/ denotes long comments and ends with */.

As for variables, you can declare them in two places: inside a function, and outside in a system.vc file. If you declare them for a function, like this:

void variable()
{
int variable;
}

then the variable can only be used inside the function. If you declare it outside a function (preferably at the top of VC files) then it is global and can be used with any function. Some weird version of verge actually had you tell the global or local type, like

global int versionnumber;
or
local int ID;

but most don't. Um, as for MAP VC code, this is the code used by your maps. When you specifiy the actions for zones or entities to do with Maped, type in the number of the event of the code. An event is declared as

event
{
// event code here
}

You can use any command inside an event function, but you cannot declare variables. Also, the MAP VC file must have the same name as the actual MAP file it goes to.

The very first event you have in any MAP VC file is the "Zero" event, and is automatically executed when you enter the map, like an intro event in RPGMaker 2000.

event
{
// event 0 code (auto)
}

event
{
// This is the first event
}

Again, you cannot declare variables in event functions, but can use any other code or functions you declared. For usable functions and built in variables see the VergeC.txt file or read it on the Vergesource Article page. Also read the FAQ on Vergesource.

Also, for the preprocessor directives, there are two:
#define and #include.

Include is used to include another VC file in another one, which is useful because all VC files you wish to use (except MAP VC) must be linked to system.vc.

So, in system.vc, you could put

#include battle.vc

and whatnot, if you decided to split your code up that way. Define is used to make constants. We are familiar with these, sure...

#define VERSION=2

And you cannot change a constant. As far as I know, includes and defines (and variables and strings declared) should go at the top of the VC file. Unless they are local and declared inside a function of course. If a VC function has a local variable which has the same name as a global one, like this:

--------------------

int globalvar;

void nothing();
{
int global;
global=10;
MsgBox(" " & global & " ", 100);
}

Then it will not use the local variable but will se the global variable to 10, and then print it. As far as I'm told, anyway.

If you understood any of this, let me know at Jud_craft@engineer.com. Or just reply to this. A couple more things.

I believe you can create your own functions that return integers and strings. In this case, I believe they have an int prefix, although I could be wrong, like this:

-----------------

int myadditionfunction(int a, int b)
{
return a+b;
}

-----------------

Yeah, I think it works like that. You can also specify a string to be returned in Winv2 and in V2kj, I think....

There are no structures or classes, if you know those, in VergeC. There was something else...

Oh yeah, one of the perks of VergeC and C in general is its function structure. This allows you to mix and use various functions within others instead of typing the same code over again, by allowing you to use so many commands and your own functions. This is a major advantage of C.

Also, you said BASIC? You mean like ATARI 800XL Basic or Visual BASIC or QBASIC or what?

If you don't understand any of this, I'll try to explain it a bit further. Let me know.



Posted on 2002-01-24 15:10:16

Omni

What do you mean, tile-by-tile scrolling? All right, I think I know what you mean, but anyway, if you have any grasp of VergeC, there are two things you should know. (If you don't understand, you will...)

1. Verge automatically has a tile-scrolling engine.

2. You could, of course, alter this, as you can write code that can affect camera movement (you can read and write to the camera variables).



Posted on 2002-01-24 15:42:05

rpgking

Verge2 has pixel-by-pixel scrolling. Tile-by-tile scrolls one tile at a time, and looks like crap. A lot of Qbasic rpgs in the past used this.



Out of clutter, find simplicity. -Einstein

Posted on 2002-01-25 20:41:52

Omni

Wow; the first program I made with that accidentally locked the computer in an eternal loop and I never touched it again.



Posted on 2002-01-26 08:29:02

rpgking

Surprisingly, QBasic has a fairly large RPG-making community... And some of the games amazed me because I didn't think they were possible in QBasic.



Out of clutter, find simplicity. -Einstein

Posted on 2002-01-27 19:33:56

Omni





Posted on 2002-01-28 06:22:35

Tricron3

If your still looking for tutorials
www.vergesource.com
is probably the better source, look under articles. That should help you out considerably.

Also, C isn't much different than Basic, and I'm telling you right now, your highschool programming class was teaching you C, except your teacher was probably a retard and called it C++. Most high school comp sci teachers know jack about programming. Or maybe you lucked out and got one with a clue.



Posted on 2002-02-11 20:26:31


Displaying 1-11 of 11 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.