View source for QuakeC Simple Types From Quake Wiki ← QuakeC Simple Types You do not have permission to edit this page, for the following reason: The action you have requested is limited to users in the group: Administrators. You can view and copy the source of this page. == The simple Types == <h4>[[void]] type</h4> <p>An empty result, mostly used for definition of procedures (i.e. functions that return no result at all). </p> <h4>[[Float]] type</h4> <p>A floating point value.</p> <p>Floats are also used to store booleans (TRUE, FALSE) or integer values link counters, or bit flags. <pre> Valid syntax: 12 1.6 0.5 -100 Invalid syntax: .5 -.50 .690 </pre> </p> <p>A parsing ambiguity is present with negative constants. "a-5" will be parsed as "a", then "-5", causing an error. Separate the - from the digits with a space "a - 5" to get the proper behavior. </p> <h4>[[Vector]] type</h4> <p>A vector, made of 3 float coordinates. <br> Used to represent positions or directions in 3D space. <br> Valid syntax: <b>'0 0 0'</b> or <b>'20.5 -10 0.00001'</b> <br> </p> <p>Note the simple quotes around the vector. Do not use double quotes, they are reserved for strings.</p> <p>If you declare a vector <b>foobar</b>, then you can access it's x, y and z fields with: <b>foobar_x</b>, <b>foobar_y</b>,<b>foobar_z</b>. </p> <h4>[[String]] type</h4> <p>This is used to store character string. <br> Used to indicate file names, or messages to be broadcast to players. <br> Valid syntax: <b>"maps/jrwiz1.bsp"</b> or <b>"ouch!\n"</b> <br> Use <b>\n</b> for newline. </p> <p>Note: that character strings cannot be modified, or concatenated. Because they are stored at fixed locations in memory, and if would be potentially troublesome to allow modification. </p> <h4>entity type</h4> <p>The reference of an entity in the game, like things, players, monsters.<br> For instance, this is the type of the entities self and other. </p> <p>The entity type is a structured type, made of [[fields]].<br> A description of each field is available. </p> Return to QuakeC Simple Types. Retrieved from "http://quakewiki.org/wiki/QuakeC_Simple_Types"