Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
6 registered members (AndrewAMD, Ayumi, degenerate_762, 7th_zorro, VoroneTZ, HoopyDerFrood), 1,268 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19053 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 | chip programmers | 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