Gamestudio Links
Zorro Links
Newest Posts
Lapsa's very own thread
by Lapsa. 06/26/24 12:45
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Lapsa), 1,268 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Mino, squik, AemStones, LucasJoshua, Baklazhan
19061 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
is this old code? #87009
08/22/06 08:52
08/22/06 08:52
Joined: May 2006
Posts: 132
Norway
Fiskekona Offline OP
Member
Fiskekona  Offline OP
Member

Joined: May 2006
Posts: 132
Norway
I am trying to learn how to make a worm game. And I found a tutorial here in the forum. I follow the tutorial and I get the error that says this:

unknown parameters
snake_cor_x
snake_cor_y
snake_pan

Can someone tell me why this is wrong and how to fix it.

the errors comes from this part of the script
Code:
 action worm_move
{
worm = me;
my.narrow = on;
my.fat = off;
torso_nr = 0;
array_torso[torso_nr*4+0] = handle(me);
my.id_handle = torso_nr;
while(1)
{
torso_nr = my.id_handle;
my.pan %= 360;
camera_worm(); // Kamera
time_off += 1 * time;
if (key_cul == on && my.pan != 270 && time_off >= time_set)
{
my.snake_cor_x = my.x; // X-Wert bei Richtungswechsel
my.snake_cor_y = my.y; // Y-Wert bei Richtungswechsel
my.pan = 90; // Pan-Wert vom Worm
array_torso[(torso_nr)*4+1] = my.pan;
// Verwaltung im Array wird noch nicht verwendet
array_torso[(torso_nr)*4+2] = my.x;
// Verwaltung im Array wird noch nicht verwendet
array_torso[(torso_nr)*4+3] = my.y;
// Verwaltung im Array wird noch nicht verwendet
my.snake_pan = my.pan; // Pan-Wert bei Richtungswechsel
time_off = 0; // Ruhezeit für Richtungswechsel
}
worm_speed = 10 * time;
move_mode = use_box;
ent_move (worm_speed, nullvector);
wait(1);
}
}




Programmer in training... Own GameStudio Commerical 6.50
Re: is this old code? [Re: Fiskekona] #87010
08/22/06 10:47
08/22/06 10:47
Joined: Aug 2004
Posts: 2,215
I
ISG Offline

Expert
ISG  Offline

Expert
I

Joined: Aug 2004
Posts: 2,215
Try making all those variables:

var snake_cor_x
var snake_cor_y
var snake_pan

And place them at the very top, for starters at least and hopefully the errors go away.


Ground Tactics - Coming Soon
Ground Tactics OFFICIAL WEBSITE
Re: is this old code? [Re: Fiskekona] #87011
08/22/06 10:47
08/22/06 10:47
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline
Expert
A.Russell  Offline
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan
You need to define those variables.

Something like:

define snake_cor_x, skill50;
define snake_cor_y, skill51;
define snake_pan, skill52;

Re: is this old code? [Re: A.Russell] #87012
08/22/06 14:31
08/22/06 14:31
Joined: May 2006
Posts: 132
Norway
Fiskekona Offline OP
Member
Fiskekona  Offline OP
Member

Joined: May 2006
Posts: 132
Norway
thanks that did the trick.


Programmer in training... Own GameStudio Commerical 6.50

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