Jump to content

Simple EOF error - Scripting


Recommended Posts

As horrible as it feels, stuck on a EOF compile error

So far checked:

 

- Space at the end of line

- Syntax

Scriptname GetFilterCharge extends ObjectReference

ObjectReference AmmoGasMaskFilter
int Property Charge = 50 auto

	int Function Get()
		return Charge
	EndFunction

	Function Set(int i)
		Charge = i
	EndFunction

EndProperty

Edited by D1v1ne122
Link to comment
Share on other sites

Hi,

 

you can make the property "auto", in this case the get/set routines are defined "auto"-matically and you can't redefine then. Trying to do so, causes an error.

Alternatively you can define the property to be non-auto. Then you have to define get/set routines yourself. Though keep in mind, that non-auto properties can't have initial values.

Link to comment
Share on other sites

Can I make a constructor to default on creation of a new AmmoGasMaskFilter instance? "Charge" acts nearly the same as Fusion Cores but drains at a different rate. I couldn't find any script examples of fusion core use so I'm trying to recreate it.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...