Scripting/Squirrel/Client Functions/dofile: Difference between revisions

From Vice City Multiplayer
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing
(Created page with "This function loads a file. == Syntax == <pre>dofile( FileName ) </pre> == Arguments == * '''STRING''' '''FileName''' This is the name of the file, must be a string. == E...")
 
No edit summary
Line 23: Line 23:
=== Notes ===
=== Notes ===


The event [[http://wiki.vc-mp.org/wiki/Scripting/Squirrel/Client_Events/Script::ScriptLoad]] was used in in this example. More info about them in the corresponding pages.
The event [http://wiki.vc-mp.org/wiki/Scripting/Squirrel/Client_Events/Script::ScriptLoad Script::ScriptLoad] was used in in this example. More info about them in the corresponding pages.

Revision as of 05:26, 12 July 2016

This function loads a file.

Syntax

dofile( FileName ) 

Arguments

  • STRING FileName This is the name of the file, must be a string.

Example

This will load the file named 'test.nut'.

function Script::ScriptLoad( ) {

dofile( "test.nut" );

}

Notes

The event Script::ScriptLoad was used in in this example. More info about them in the corresponding pages.