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
2 registered members (TipmyPip, 1 invisible), 18,731 guests, and 7 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
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 | 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