PropertyValue
rdfs:label
  • Assert
rdfs:comment
  • The Broken {{ref}} (youtube link) Broken {{ref}} (youtube link) Broken {{ref}} (youtube link) is a vehicle in Saints Row IV.
  • function Assert (string sMessage, int bValue, int bLog = FALSE) Internal function * Return type: void * Include file: nwscriptdefn
  • This is a simple example about using asserts by Christopher Oliver, 24-May-2007 on Orangevolt that works in JFXPad. To do something with an assertion you use "assert" triggers: trigger on not assert assertion { throw "Assertion failed: {assertion}"; } trigger on assert assertion { println("Assertion passed: {assertion}"); } var a = [1,2]; assert sizeof a == 2; assert sizeof a == 1; compile thread: Thread[AWT-EventQueue-0,6,main] compile 0.0060 Assertion passed: Assertion {description: [] sourceURL: 'file:/Users/coliver/javafx/trunk/assert.fx' lineNumber: 10 assertion: 'sizeof a == 2' result: true} uncaught FX exception: 'Assertion failed: Assertion {description: [] sourceURL: 'file:/Users/coliver/javafx/trunk/assert.fx' lineNumber: 11 assertion: 'sizeof a == 1' result: false}' at throw "As
dcterms:subject
Large
  • No
steer angle
  • 35
Hitpoints
  • 7000
front image
  • Assert SRIV.png
hostage class
  • Sedan
steer speed
  • 50
parked
  • No
vehicle class
  • Domestic
convertible
  • N/A
Nitro
  • 95
dbkwik:saintsrow/property/wikiPageUsesTemplate
Appearances
  • Saints Row IV
Speed
  • 85
doors
  • 0
Logo
  • Assert logo SRIV.png
Name
Torque
  • 450
Caption
  • The Assert in Saints Row IV
Mass
  • 1800
Law
Grip
  • 0.050000
Capacity
  • 4
Image size
  • 300
unlockable
  • Virus Collection
vehicle style
  • Alien Car
abstract
  • The Broken {{ref}} (youtube link) Broken {{ref}} (youtube link) Broken {{ref}} (youtube link) is a vehicle in Saints Row IV.
  • This is a simple example about using asserts by Christopher Oliver, 24-May-2007 on Orangevolt that works in JFXPad. To do something with an assertion you use "assert" triggers: trigger on not assert assertion { throw "Assertion failed: {assertion}"; } trigger on assert assertion { println("Assertion passed: {assertion}"); } var a = [1,2]; assert sizeof a == 2; assert sizeof a == 1; compile thread: Thread[AWT-EventQueue-0,6,main] compile 0.0060 Assertion passed: Assertion {description: [] sourceURL: 'file:/Users/coliver/javafx/trunk/assert.fx' lineNumber: 10 assertion: 'sizeof a == 2' result: true} uncaught FX exception: 'Assertion failed: Assertion {description: [] sourceURL: 'file:/Users/coliver/javafx/trunk/assert.fx' lineNumber: 11 assertion: 'sizeof a == 1' result: false}' at throw "Assertion failed: {assertion}"; ("file:/Users/coliver/javafx/trunk/assert.fx", Line 2) You can have multiple such triggers. Also you can pass a description of the assertion like this: assert sizeof a == 1 : "This should fail: size = {sizeof a}"; The object passed to your trigger is an instance of the Assertion class which looks like this public class Assertion { public attribute description: String*; public attribute sourceURL: String?; public attribute lineNumber: Number; public attribute assertion: String; public attribute result: Boolean; } The value after the ":" in the assert statement (which may be a list of trings) will be assigned to the description attribute of the assertion bject passed to your triggers.
  • function Assert (string sMessage, int bValue, int bLog = FALSE) Internal function * Return type: void * Include file: nwscriptdefn