Misc. scripting questions now

Discuss all aspects related to modding Zandronum here.
Post Reply
Krispy
 
Posts: 88
Joined: Tue Jun 05, 2012 9:37 pm
Location: Michigan

Misc. scripting questions now

#1

Post by Krispy » Thu Aug 16, 2012 10:18 pm

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?
Last edited by Krispy on Fri Aug 17, 2012 7:37 pm, edited 1 time in total.

Springy
Forum Regular
Posts: 233
Joined: Wed Jun 06, 2012 10:56 pm
Location: Britland
Contact:

RE: Very simple script not compiling

#2

Post by Springy » Thu Aug 16, 2012 10:39 pm

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.
Last edited by Springy on Thu Aug 16, 2012 10:41 pm, edited 1 time in total.
[quote=Zero X Diamond ]Careful, you don't want to push that Pikachu dude to action. Who knows what unspeakable things lie in store for you? Maybe he'll... send you another nasty tweet![/quote]
[quote=Sonter_Man]Autism runs amok on zandaemon[/quote]

Neewbie
Forum Regular
Posts: 140
Joined: Sat Jun 23, 2012 11:10 am

RE: Very simple script not compiling

#3

Post by Neewbie » Thu Aug 16, 2012 10:41 pm

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)
Last edited by Neewbie on Thu Aug 16, 2012 10:45 pm, edited 1 time in total.

Watermelon
Zandrone
Posts: 1244
Joined: Thu Jun 28, 2012 9:07 pm
Location: Rwanda

RE: Very simple script not compiling

#4

Post by Watermelon » Thu Aug 16, 2012 10:45 pm

OP forgot the quotation marks

"Fist"

"Pistol"

Springy
Forum Regular
Posts: 233
Joined: Wed Jun 06, 2012 10:56 pm
Location: Britland
Contact:

RE: Very simple script not compiling

#5

Post by Springy » Thu Aug 16, 2012 10:47 pm

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.
[quote=Zero X Diamond ]Careful, you don't want to push that Pikachu dude to action. Who knows what unspeakable things lie in store for you? Maybe he'll... send you another nasty tweet![/quote]
[quote=Sonter_Man]Autism runs amok on zandaemon[/quote]

Catastrophe
Retired Staff / Community Team Member
Posts: 2569
Joined: Sat Jun 02, 2012 2:44 am

RE: Very simple script not compiling

#6

Post by Catastrophe » Thu Aug 16, 2012 10:48 pm

you gotta do "fist", not just fist.

yes include the marks
Last edited by Catastrophe on Thu Aug 16, 2012 10:48 pm, edited 1 time in total.

Krispy
 
Posts: 88
Joined: Tue Jun 05, 2012 9:37 pm
Location: Michigan

RE: Very simple script not compiling

#7

Post by Krispy » Thu Aug 16, 2012 10:51 pm

Thanks. Yeah, those quotation marks. I just restarted scripting.

Llewellyn
Forum Regular
Posts: 578
Joined: Mon Jul 02, 2012 7:12 am

RE: Very simple script not compiling

#8

Post by Llewellyn » Fri Aug 17, 2012 5:34 am

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.

Krispy
 
Posts: 88
Joined: Tue Jun 05, 2012 9:37 pm
Location: Michigan

RE: Very simple script not compiling

#9

Post by Krispy » Fri Aug 17, 2012 5:59 pm

Well, it works, so I must be dreaming.

Ijon Tichy
Frequent Poster Miles card holder
Posts: 901
Joined: Mon Jun 04, 2012 5:07 am

RE: Very simple script not compiling

#10

Post by Ijon Tichy » Fri Aug 17, 2012 7:00 pm

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.
Last edited by Ijon Tichy on Fri Aug 17, 2012 7:00 pm, edited 1 time in total.

Krispy
 
Posts: 88
Joined: Tue Jun 05, 2012 9:37 pm
Location: Michigan

RE: Misc. editing questions now

#11

Post by Krispy » Fri Aug 17, 2012 7:34 pm

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?
Last edited by Krispy on Sat Aug 18, 2012 5:15 pm, edited 1 time in total.

Krispy
 
Posts: 88
Joined: Tue Jun 05, 2012 9:37 pm
Location: Michigan

RE: Misc. scripting questions now

#12

Post by Krispy » Sun Aug 19, 2012 1:08 am

Nevermind, I just need to kill the player. what script would this be? I searched and came up empty.

Llewellyn
Forum Regular
Posts: 578
Joined: Mon Jul 02, 2012 7:12 am

RE: Misc. scripting questions now

#13

Post by Llewellyn » Sun Aug 19, 2012 3:20 am


Post Reply