Page 1 of 1
Misc. scripting questions now
Posted: Thu Aug 16, 2012 10:18 pm
by Krispy
Here it is:
#include "zcommon.acs"
script 1 open
{
Takeactorinventory(0, fist);
takeactorinventory(0, pistol);
}
"fist: identifier has not been declared."
What's up with that?
RE: Very simple script not compiling
Posted: Thu Aug 16, 2012 10:39 pm
by Springy
Isn't open supposed to be in capitals and the T supposed to be lower case? I don't know if ACS is caps sensitive or not but that might be interfering with the code. If not then try replacing open with enter.
RE: Very simple script not compiling
Posted: Thu Aug 16, 2012 10:41 pm
by Neewbie
Use ClearInventory(); instead
Spoiler: here (Open)include "zcommon.acs"
script 1 OPEN {
ClearInventory();
}
Springy wrote:
Isn't open supposed to be in capitals and the T supposed to be lower case? I don't know if ACS is caps sensitive or not but that might be interfering with the code. If not then try replacing open with enter.
Doesn't matter, the error was that he forget to put the fist and pistol in "" and didn't specified the amount (maybe it's optional)
RE: Very simple script not compiling
Posted: Thu Aug 16, 2012 10:45 pm
by Watermelon
OP forgot the quotation marks
"Fist"
"Pistol"
RE: Very simple script not compiling
Posted: Thu Aug 16, 2012 10:47 pm
by Springy
Neewbie wrote:
Use ClearInventory(); instead
Spoiler: here (Open)include "zcommon.acs"
script 1 OPEN {
ClearInventory();
}
Springy wrote:
Isn't open supposed to be in capitals and the T supposed to be lower case? I don't know if ACS is caps sensitive or not but that might be interfering with the code. If not then try replacing open with enter.
Doesn't matter, the error was that he forget to put the fist and pistol in "" and didn't specified the amount (maybe it's optional)
Oh okay then I guess I learnt something in the process, thanks.
RE: Very simple script not compiling
Posted: Thu Aug 16, 2012 10:48 pm
by Catastrophe
you gotta do "fist", not just fist.
yes include the marks
RE: Very simple script not compiling
Posted: Thu Aug 16, 2012 10:51 pm
by Krispy
Thanks. Yeah, those quotation marks. I just restarted scripting.
RE: Very simple script not compiling
Posted: Fri Aug 17, 2012 5:34 am
by Llewellyn
Just a hint, the player doesn't exist during the OPEN script.
OPEN happens when the map starts up, so the player hasn't yet entered the game. ENTER is what you want, which is what happens when the player ENTERs the map.
RE: Very simple script not compiling
Posted: Fri Aug 17, 2012 5:59 pm
by Krispy
Well, it works, so I must be dreaming.
RE: Very simple script not compiling
Posted: Fri Aug 17, 2012 7:00 pm
by Ijon Tichy
It'll work in single-player (in single-player, the player does exist, and for some reason is the OPEN script activator), but not in multiplayer (where the world is the script activator, and the players don't necessarily exist). Use ENTER instead.
RE: Misc. editing questions now
Posted: Fri Aug 17, 2012 7:34 pm
by Krispy
Alright alright I did it- And now for another question: I want to restart the level without killing the player using an acs script. How would this be done?
RE: Misc. scripting questions now
Posted: Sun Aug 19, 2012 1:08 am
by Krispy
Nevermind, I just need to kill the player. what script would this be? I searched and came up empty.
RE: Misc. scripting questions now
Posted: Sun Aug 19, 2012 3:20 am
by Llewellyn