Gamestudio Links
Zorro Links
Newest Posts
FXCM demo test failed
by qin. 01/13/26 02:32
Camera always moves upwards?
by NeoDumont. 01/12/26 09:39
Alpaca Plugin v1.5.2 Release
by kzhao. 01/11/26 13:42
Alpaca Plugin v1.4.0
by kzhao. 01/11/26 13:38
separating groups of 3 digits by a comma
by joe_kane. 01/11/26 00:01
MRC.c and WFO
by joe_kane. 01/10/26 23:58
BarOffset (default = 940 for daily bars?
by joe_kane. 01/10/26 23:46
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (AndrewAMD, kzhao, qin), 21,501 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
promfast, joe_kane, Namitha_NN, Syndrela, agasior
19190 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
error when compiling forcefield code - need help #125892
04/23/07 15:06
04/23/07 15:06
Joined: Oct 2005
Posts: 42
A
aslan123 Offline OP
Newbie
aslan123  Offline OP
Newbie
A

Joined: Oct 2005
Posts: 42
hi guys

when i compile my game with this wdl file included in my main i get an error saying

var number_of_particles = nop;
forcefield.wdl (32.3) error(12) number sytax skill1

var particle_distance = pd;
forcefield.wdl (32.4) error(12) number sytax skill1

can anyone help with this

thanks

code is bellow







bmap redflare_pcx = <redflare.pcx>;

///////////////////////////////////////////////////////////////////////////////////////////////////////

DEFINE nop,skill1; //current HEALTH units
DEFINE pd,skill2; //current ACORNS units
///////////////////////////////////////////////////////////////////////////////////////////////////////

function particle_barrier();
function keep_particles();
function kill_them();

///////////////////////////////////////////////////////////////////////////////////////////////////////

action killer
{
my.invisible = on;
my.enable_impact = on;
my.enable_entity = on;
my.event = kill_them;
}

action force_field
{
var number_of_particles = nop; // number of particles (force field length)
var particle_distance = pd; // distance between two consecutive particles
if (my.nop == 0) {number_of_particles = 600;} // default number of particles
if (my.pd == 0) {particle_distance = 0.2;} // default distance between two consecutive particles
vec_set (temp, my.pos);
while (number_of_particles > 0) // don't use a wait(1) here
{
temp.x += particle_distance * cos(my.pan);
temp.y += particle_distance * sin(my.pan);
effect(particle_barrier, 1, temp, normal);
number_of_particles -= 1;
}
}

function particle_barrier()
{
my.bmap = redflare_pcx;
my.flare = on;
my.bright = on;
my.size = 10;
my.function = keep_particles;
}

function keep_particles()
{
my.lifespan = 10; // keep the particle alive
my.alpha = 30 + random(70); // show some activity
}

function kill_them()
{
wait (1);
if (you != null)
{
you.health = -10;
}
}

Re: error when compiling forcefield code - need he [Re: aslan123] #125893
04/23/07 15:22
04/23/07 15:22
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline
Serious User
Scorpion  Offline
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
dont write: nop
write: my.nop

Re: error when compiling forcefield code - need he [Re: Scorpion] #125894
04/23/07 15:42
04/23/07 15:42
Joined: Oct 2005
Posts: 42
A
aslan123 Offline OP
Newbie
aslan123  Offline OP
Newbie
A

Joined: Oct 2005
Posts: 42
thanks scorpion

that worked - soo simple as well

5 stars for you


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1