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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, ozgur), 1,415 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Problem wih loading bitmaps #267537
05/24/09 19:24
05/24/09 19:24
Joined: May 2009
Posts: 12
PurePain Offline OP
Newbie
PurePain  Offline OP
Newbie

Joined: May 2009
Posts: 12
I can't load any bitmap or panel into my game, because of error, which says: <BMAP* lol_pcx = ^lol.pcx";> Syntax error - lol.pcx invalid character.

To make it more funny, all samples works fine and bitmaps in them load correctly. Here's a piece of code that defines bitmap in my script : BMAP* lol_pcx = "lol.pcx";

And of course i have lol.pcx image in my script's folder

EDIT:
I discovered that I can load a sprite in WED with no problems. Maybe somebody will know how to take that sprite on my screen as a crosshair?

Last edited by PurePain; 05/24/09 19:44.
Re: Problem wih loading bitmaps [Re: PurePain] #267674
05/25/09 19:31
05/25/09 19:31
Joined: May 2009
Posts: 12
PurePain Offline OP
Newbie
PurePain  Offline OP
Newbie

Joined: May 2009
Posts: 12
anybody...?

Re: Problem wih loading bitmaps [Re: PurePain] #267676
05/25/09 20:07
05/25/09 20:07
Joined: Jun 2008
Posts: 151
Ukraine
XD1v0 Offline
Member
XD1v0  Offline
Member

Joined: Jun 2008
Posts: 151
Ukraine
Maybe engine do not want load funny picture, just kidding grin
PurePain maybe you save source file as *.wdl, also check code before define bmap,do you can post full code? What version do you use?


A7 Commercial cool
Celeron 1700, GeForce 5500 FX 256mb, 1 Gb Ram
Re: Problem wih loading bitmaps [Re: XD1v0] #267677
05/25/09 20:09
05/25/09 20:09
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
give it a name other than lol_pcx and tell me if it works :


3333333333
Re: Problem wih loading bitmaps [Re: XD1v0] #267859
05/26/09 15:13
05/26/09 15:13
Joined: May 2009
Posts: 12
PurePain Offline OP
Newbie
PurePain  Offline OP
Newbie

Joined: May 2009
Posts: 12
Thank You Very Much XD1v0 ! The problem was saving my srcipt to .wdl not to .c . But now I have a next problem frown .After saving in .c my script has got some new errors. When I try to compile it, following error appears:
Error in 'MAIN' line 60: syntax error
< anim_percentage==0; >

Before saving in .c everything was cool. It seems like it's having problems with variables cuz when i delete line with an error, next one appears in some other line. So could someone please tell me WTF is wrong again ? blush

Here's my full code anyways:

//////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////
///////////////////////////////


var bone_angle;
ENTITY* colt;

BMAP* first_pcx = "first.pcx"; // my first bmap

PANEL* first_pan = // my first panel
{
pos_x = 0;
pos_y = 0;
layer = 1;
bmap = first_pcx;
flags = OVERLAY | VISIBLE;
}
////////////////////////////////////////////////////////////////////////////////////


function main()
{
video_set(1024,768,32,1);
level_load ("level3.wmb");
wait (3);
}

function poruszanie_sie()
{
player=me;
var ruch = 0;
var mouse_speed = 10;
var anim_percentage;
var turn_speed;
var strzal_czas;
colt=ent_create("colt.mdl", 0, 0);
colt.PASSABLE = ON;
colt.scale_x = 0.15;
colt.scale_y = colt.scale_x;
colt.scale_z = colt.scale_x;
while(1)
{
c_move (my, vector(0, 0, 0), vector(0, 0, -5 * time_step), IGNORE_PASSABLE|GLIDE);
if (key_a) {c_move (my, vector(0, 7.5 * time_step, 0), nullvector, IGNORE_PASSABLE|GLIDE);}
if (key_d){c_move (my, vector(0, -7.5 * time_step, 0), nullvector, IGNORE_PASSABLE|GLIDE);}
if (key_w){c_move (my, vector(15 * time_step,0,0), nullvector, IGNORE_PASSABLE|GLIDE);ruch=2;}
else {ruch=0;}
if (key_s){c_move (my, vector(-15 * time_step, 0, 0), nullvector, IGNORE_PASSABLE|GLIDE);}
if (mouse_left) {strzal_czas=50;}
strzal_czas-= 1 * time_step;
if (strzal_czas<0) {strzal_czas=0;}

//------------Animacja-----------------------------------------
if (ruch == 0)
{
ent_animate(my, NULL, 0, 0);
anim_percentage==0;
if (strzal_czas==0){ent_animate(my,"Stand",anim_percentage, ANM_CYCLE);}
else
{
ent_animate(my,"StandAim",anim_percentage, ANM_CYCLE);
bone_angle.pan = camera.tilt * -1 -13; // changes pan from -40 to +40 degrees
ent_bonerotate(my,"Bip01 R UpperArm", bone_angle);
}
anim_percentage += 3 * time_step;
}
if (ruch == 2)
{
ent_animate(my, NULL, 0, 0);
if (strzal_czas==0) {ent_animate(my, "Run", anim_percentage, ANM_CYCLE);}
else
{
ent_animate(my, "RunAim", anim_percentage, ANM_CYCLE);
bone_angle.pan = camera.tilt * -1 -13; // changes pan from -40 to +40 degrees
ent_bonerotate(my,"Bip01 R UpperArm", bone_angle);
}
anim_percentage += 5 * time_step;
}

//--------Kamera--------------------------------------------
camera.pan -= mouse_force.x * 24 * time;
player.pan=camera.pan;
camera.tilt += mouse_force.y * 24 * time;
if (camera.tilt>=46)
{
camera.tilt=46;
}
if (camera.tilt<=-70)
{
camera.tilt=-70;
}
temp = fcos(camera.tilt,-50);
vec_set(camera.x,vector(my.x + fcos(camera.pan,temp),my.y +
fsin(camera.pan,temp),my.z + 12 + fsin(camera.tilt,-50)));

//-----------Attach-----------------------------------------------
vec_for_vertex(colt.x,player,447);
ang_for_bone(colt.pan,player,"Bip01 R Hand");
wait(1);

}
}

Re: Problem wih loading bitmaps [Re: PurePain] #267893
05/26/09 17:58
05/26/09 17:58
Joined: Feb 2009
Posts: 38
Germany
P
Phonech Offline
Newbie
Phonech  Offline
Newbie
P

Joined: Feb 2009
Posts: 38
Germany
One = is enough.

Re: Problem wih loading bitmaps [Re: Phonech] #267894
05/26/09 18:01
05/26/09 18:01
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
yes == is for comparison, you have to use one = when you are assigning a value to a varibale


3333333333
Re: Problem wih loading bitmaps [Re: Quad] #267910
05/26/09 19:21
05/26/09 19:21
Joined: May 2009
Posts: 12
PurePain Offline OP
Newbie
PurePain  Offline OP
Newbie

Joined: May 2009
Posts: 12
Ok I repaired my code - it was full of errors (I wonder how was it working when it was .wdl). But I can't fix one. Here it goes:
'passable' is not a member of 'ENTITY'
<colt.passable = on;>
I have tried few things but I don't know what's wrong with it. Any ideas smile ?

Re: Problem wih loading bitmaps [Re: PurePain] #267911
05/26/09 19:28
05/26/09 19:28
Joined: Feb 2009
Posts: 38
Germany
P
Phonech Offline
Newbie
Phonech  Offline
Newbie
P

Joined: Feb 2009
Posts: 38
Germany
set(colt,PASSABLE)

Re: Problem wih loading bitmaps [Re: Phonech] #267940
05/26/09 23:14
05/26/09 23:14
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
lite-c is case-sensitive, and c-script wass too, but only a bit.

Most flag values, like PASSABLE, INVISIBLE etc are all upper-case where
they were lower case in c-script.

Also, in your script, anytime you come across a value being set to ON, thats c-script.
It needs changing to the lite-c "set" function.
IE
colt.passable = on; should be set(colt,PASSABLE); and
colt.passable = off; should be reset(colt,PASSABLE);
Check "flags" in the manual for more info.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Page 1 of 2 1 2

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