Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
5 registered members (Dico, AndrewAMD, TipmyPip, NewbieZorro, Grant), 15,791 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
script #176796
01/06/08 22:06
01/06/08 22:06
Joined: Jan 2007
Posts: 40
germany
boochie Offline OP
Warez
boochie  Offline OP
Warez

Joined: Jan 2007
Posts: 40
germany
Hi all!
You have to know, I'm a total noob in scripting an want to learn it. Here's a script I copied from a tutorial:
//////////////////////////////////////
VAR video_mode=8;
VAR vidoe_depth=16;

schwarz_bmap=<Bild.pcx>;
//////////////////////////////////////
panel bild_pan;
{
pos_x=0;
pos_y=0;

bmap=schwarz_bmap;
}
//////////////////////////////////////
FUNCTION main;
{
bild_pan.visible=on;
load_level("tut_level.wmb");
}
It should show a simpel black screen in a panel. But it doesn't. There are some ERRORs if I start the engine:

schwarz_bmap=<bild.pcx>;
bild.wdl 5:0 ERROR(29): keyword unknown <schwarz.bmap>

<panel bild_pan;>
bild.wdl 7:0 ERROR(29): keyword unknown panel

<pos_x=0;>
bild.wdl 9:0 ERROR(19): parameter unknown bad keyword in {}

<pos_y=0;>
bild.wdl 9:0 ERROR(19): parameter unknown bad keyword in {}

What's my mistake?

Please help! SOS!


Use condoms! They fit perfectly over your head! xD USING 3D GAMESTUDIO VERSION 6.22 PRO & BLENDER
Re: script [Re: boochie] #176797
01/07/08 01:21
01/07/08 01:21
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
You spelt video_depth wrong.You have to use the BMAP pointer when creating a BMAP and you have to put the name in "" instead of <>. You can just set the panel's visibility using the flags=visible;. Also dont put a ; after u define a panel or function.

This should work>>>

//////////////////////////////////////
VAR video_mode=8;
VAR video_depth=16;

BMAP schwarz_bmap="Bild.pcx";
//////////////////////////////////////
panel bild_pan
{
pos_x=0;
pos_y=0;
bmap=schwarz_bmap;
flags=visible;
}
//////////////////////////////////////
FUNCTION main()
{
load_level("tut_level.wmb");
wait(2);
}

Last edited by DJBMASTER; 01/07/08 01:26.
Re: script [Re: DJBMASTER] #176798
01/07/08 09:35
01/07/08 09:35
Joined: Jul 2005
Posts: 262
Earth, The Netherlands
NL_3DGS_n00b Offline
Member
NL_3DGS_n00b  Offline
Member

Joined: Jul 2005
Posts: 262
Earth, The Netherlands
Quote:

BMAP schwarz_bmap="Bild.pcx";



Using "" (Quotation marks) is for Lite-C only.
Using regular C-Script this line must look like:

BMAP schwarz_bmap = <"Bild.pcx">;

Also, if you did write it for Lite-C, you have to put a * behind BMAP.
(I might have been mistaken, I wrote this at work, so I can't double check with my script I have written at home...)

@boochie,
You should use a topic title which tells your problem before people look in this topic.
Like this: "Error messages in script". (Or something )


The best games are the games you create yourself.
Re: script [Re: NL_3DGS_n00b] #176799
01/07/08 14:28
01/07/08 14:28
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
I never place my resource strings between <> and they work fine. I wrote this for c-script...

Re: script [Re: DJBMASTER] #176800
01/07/08 15:32
01/07/08 15:32
Joined: Jul 2005
Posts: 262
Earth, The Netherlands
NL_3DGS_n00b Offline
Member
NL_3DGS_n00b  Offline
Member

Joined: Jul 2005
Posts: 262
Earth, The Netherlands
Ok, my bad .
I always used <>, so it was standard for me .


The best games are the games you create yourself.
Re: script [Re: NL_3DGS_n00b] #176801
01/08/08 17:20
01/08/08 17:20
Joined: Jan 2007
Posts: 40
germany
boochie Offline OP
Warez
boochie  Offline OP
Warez

Joined: Jan 2007
Posts: 40
germany
I use C-Script, sorry . Thank you! I'll try imediatly.

EDIT:
Ok, everthing works now. Thanks once again!

Last edited by boochie; 01/08/08 18:03.

Use condoms! They fit perfectly over your head! xD USING 3D GAMESTUDIO VERSION 6.22 PRO & BLENDER
Re: script [Re: boochie] #176802
01/09/08 21:52
01/09/08 21:52
Joined: Jan 2007
Posts: 40
germany
boochie Offline OP
Warez
boochie  Offline OP
Warez

Joined: Jan 2007
Posts: 40
germany
I have another problem. Now I'm trying to show a text, when a counter has ounted to 0. I've got 1 ERROR:
< first()>
36:0 ERROR(267): syntax ERROR - first() function uknown
And here is the script:
//////////////////////////////////////
VAR video_mode=8;
VAR video_depth=16;//Tiefe der Videofarbe=16bit

VAR counter=100;//Counter wird auf 100 gesetzt

FONT arial_font="Arial",0,20;//Font=Arial, Schriftgröße 20
STRING hello="HAHA, your bad.";

BMAP schwarz_bmap=<"Bild.pcx">;//definiert Bild.pcx
//////////////////////////////////////
STRING first_string="Hallo, du kleine Nutte!";
FONT arial="Arial",0,20;

TEXT first()
{
pos_x=0;
pos_y=100;
string="first_string";
font=arial;
flags=visible,center_x,center_y;
}
//////////////////////////////////////
panel bild_pan
{
pos_x=0;
pos_y=0;
bmap=schwarz_bmap;//benutzt Bild.pcx
flags=visible;//mache das Panel sichtbar
digits=10,10,3,arial_font,1,counter;
}
//////////////////////////////////////
FUNCTION counter_start
{
if(counter>0){counter-=1; sleep(1);}
else{first();} -----------------HERE IS THE ERROR
}
//////////////////////////////////////
FUNCTION main()
{
load_level("tut_level.wmb");//lädt Level
counter_start();
wait(2);//warte 2 Frames
}

In the ERROR is written,"unknown function", but it is a text! What does this mean?

PS:
Sorry for my never ending questios.

Last edited by boochie; 01/10/08 12:00.

Use condoms! They fit perfectly over your head! xD USING 3D GAMESTUDIO VERSION 6.22 PRO & BLENDER
Re: script [Re: boochie] #176803
01/09/08 23:29
01/09/08 23:29
Joined: Jan 2003
Posts: 4,305
Damocles Offline
Expert
Damocles  Offline
Expert

Joined: Jan 2003
Posts: 4,305
du musst die klammern weglassen bei text, da text keine parameter bekommen kann

flags= -> nicht visible setzen, solange es noch nicht sichtbar sein soll



....

else{first.visible=on;}

Re: script [Re: Damocles] #176804
01/10/08 16:54
01/10/08 16:54
Joined: Jan 2007
Posts: 40
germany
boochie Offline OP
Warez
boochie  Offline OP
Warez

Joined: Jan 2007
Posts: 40
germany
Ich hab es geändert, aber jetzt gibt es einen nuen ERROR:
< first;>
ERROR: keyword unknown first counter_start

Was ist jetzt los?

-----------------
english:
I changed the script, but there's still one ERROR:
< first;>
ERROR: keyword unknown first counter_start

What's going on?

Last edited by boochie; 01/10/08 20:21.

Use condoms! They fit perfectly over your head! xD USING 3D GAMESTUDIO VERSION 6.22 PRO & BLENDER
Re: script [Re: boochie] #176805
01/12/08 19:18
01/12/08 19:18
Joined: Dec 2006
Posts: 78
Nevada, USA
Futurulus Offline
Junior Member
Futurulus  Offline
Junior Member

Joined: Dec 2006
Posts: 78
Nevada, USA
Panels and texts shouldn't have parentheses (), but functions should.
Code:
FUNCTION counter_start()
{
// ...



EDIT: Ah, I see what you're trying to do. Don't call first like a function. first is an object, and you want to change one of its properties (i.e., whether it's visible). You do that like this:
Code:
first.VISIBLE = on;



Last edited by Futurulus; 01/12/08 19:25.
Page 1 of 2 1 2

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