Page 1 of 1

unknown (builtin) method 'getent' ????

Posted: January 6th, 2007, 3:29 am
by Jumpy'z
when i want to play my map it give me this script error

Code: Select all

******* script compile error *******
unknown (builtin) method 'getent'
************************************

There is my gsc

Code: Select all

main() 
{ 
maps\mp\_load::main(); 

		level._effect["fire"] = loadfx ("fx/fire/tinybon.efx");
		maps\mp\_fx::loopfx("fire", (-360, -280, 195), 0.6);
		level._effect["smoke"] = loadfx ("fx/smoke/ash_smoke.efx");
		maps\mp\_fx::loopfx("smoke", (-360, -280, 200), 0.7);


thread jump_door();
thread jump_roll();
thread jump_platform();
thread jump_exit();
}

jump_door()
{
door getent ("jump_door","targetname");
trigger getent ("jump_door_trig","targetname");
while(1)
{
trigger waittil("trigger");
door rotateyaw(90,2,1,1);
wait(5);
door rotateyaw(-90,2,1,1);
wait(2);
user iprintlnbold("Welcome to the ^1Jump ^7section");
door waittil("rotatedone");
}
}

jump_roll()
{
roll getent ("jump_roll","targetname");
trigger getent ("jump_roll_trig","targetname");
while(1)
{
trigger waittil("trigger");
wait(1);
roll rotateroll(360,3,1,1);
wait(1);
roll rotateroll(-360,3,1,1);
wait(1);
roll rotateroll(360,3,1,1);
wait(1);
roll rotateroll(-360,3,1,1);

roll waittil("rotatedone");
}
}

jump_platform()
{
platform getent ("jump_platform","targetname");
trigger getent ("jump_platform_trig","targetname");
while(1)
{
trigger waittil("trigger");
user iprintlnbold("^1Now ^7get on the platform if you dont wanna walk :P");
wait(5);
platform moveto((0,1235,0),10,2,2);
wait(11);
platform moveto((0,1235,864),5,2,2);
wait(6);
platform moveto((0,1235,-24),1,0,0);
wait(5);
platform moveto((0,1235,0),1,0,0);
wait(2);
platform moveto((0,1235,0),5,2,2);
wait(6);
platform moveto((0,0,0),10,2,2);

platform waittil("movedone");
}
}

jump_exit()
{
trigger getent ("jump_exit_trig","targetname");
door getent ("jump_exit","targetname");
while(1)
{
trigger waittil("trigger");
user iprintlnbold("^1Congratulation ^7you have ^1Finished^7 the ^1Jump ^7section");
wait(2);
door rotateyaw(90,2,1,1);
wait(5);
door rotateyaw(-90,2,1,1);
door waittil("rotatedone");
}
}

Re: unknown (builtin) method 'getent' ????

Posted: January 6th, 2007, 4:22 am
by Soviet

Code: Select all

main() 
{ 
maps\mp\_load::main(); 

		level._effect["fire"] = loadfx ("fx/fire/tinybon.efx");
		maps\mp\_fx::loopfx("fire", (-360, -280, 195), 0.6);
		level._effect["smoke"] = loadfx ("fx/smoke/ash_smoke.efx");
		maps\mp\_fx::loopfx("smoke", (-360, -280, 200), 0.7);


thread jump_door();
thread jump_roll();
thread jump_platform();
thread jump_exit();
}

jump_door()
{
door = getent ("jump_door","targetname");
trigger = getent ("jump_door_trig","targetname");
while(1)
{
trigger waittil("trigger");
door rotateyaw(90,2,1,1);
wait(5);
door rotateyaw(-90,2,1,1);
wait(2);
user iprintlnbold("Welcome to the ^1Jump ^7section");
door waittil("rotatedone");
}
}

jump_roll()
{
roll = getent ("jump_roll","targetname");
trigger = getent ("jump_roll_trig","targetname");
while(1)
{
trigger waittil("trigger");
wait(1);
roll rotateroll(360,3,1,1);
wait(1);
roll rotateroll(-360,3,1,1);
wait(1);
roll rotateroll(360,3,1,1);
wait(1);
roll rotateroll(-360,3,1,1);

roll waittil("rotatedone");
}
}

jump_platform()
{
platform = getent ("jump_platform","targetname");
trigger = getent ("jump_platform_trig","targetname");
while(1)
{
trigger waittil("trigger");
user iprintlnbold("^1Now ^7get on the platform if you dont wanna walk :P");
wait(5);
platform moveto((0,1235,0),10,2,2);
wait(11);
platform moveto((0,1235,864),5,2,2);
wait(6);
platform moveto((0,1235,-24),1,0,0);
wait(5);
platform moveto((0,1235,0),1,0,0);
wait(2);
platform moveto((0,1235,0),5,2,2);
wait(6);
platform moveto((0,0,0),10,2,2);

platform waittil("movedone");
}
}

jump_exit()
{
trigger = getent ("jump_exit_trig","targetname");
door = getent ("jump_exit","targetname");
while(1)
{
trigger waittil("trigger");
user iprintlnbold("^1Congratulation ^7you have ^1Finished^7 the ^1Jump ^7section");
wait(2);
door rotateyaw(90,2,1,1);
wait(5);
door rotateyaw(-90,2,1,1);
door waittil("rotatedone");
}
}
that should fix it, also you might want to think about adding your map name at the beginning of your targetnames for your entities, otherwise it may cause script confusion within the game with other maps

Posted: January 6th, 2007, 4:54 am
by Jumpy'z
oh! I see i forget every = .... cause i was trying to make all the script without copying other scipt :S

Posted: January 6th, 2007, 5:31 am
by Soviet
does it work now?