-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Milestone
Description
Tested enum:
Case 1: Use enum as parameter of a command:
{$CLEO}
{$USE SAMPFUNCS}
NOP
if File fileAHandle = open_file {filePathName} "cleo:\cleo_plugins\SA.Math.cleo" {mode} FileMode.ReadBinary
then
// do something
close_file fileAHandle
end
{0A93:} terminate_this_custom_script
Case 2: Use enum as conditional statement
{$CLEO}
{$USE text}
{$USE SAMPFUNCS}
NOP
int compareStr
// do something to store a stringpointer at comparePtr
if compareStr == FileMode.AppendText // <-- synonymous to Text.IsEqual(comparePtr,FileMode.AppendText)
then // both strings are equal
else // both strings aren't equal
end
terminate_this_custom_script
Case 3: Use enum as a constant
{$CLEO}
{$USE SAMPFUNCS}
NOP
const FILEMODE = FileMode.WriteBinary
if File fileAHandle = open_file {filePathName} "cleo:\cleo_plugins\SA.Math.cleo" {mode} FILEMODE
then
// do something
close_file fileAHandle
end
terminate_this_custom_script
Reactions are currently unavailable



