i always get Expected an identifier, got User Function send_attack instead.
regardless of what i do i cant seem to get rid of it...
whats the criteria to naming a function...
here i was thinking that can_cast would be orright :S
function identify criteria
Moderator: POL Developer
It reports a conflict both when finding a function whose name is the same of another function, or even a parameter of a function whose name equals another function's (in the scope). I know that from experience
So for example if you try to compile this:
you'll get such error, precisely this:
of course because a function named "target" exists in the scope (UO.em).
PS: obviously it won't tell you the same if if finds two arguments of two different functions in the scope having the same name.. the conflict matching occurs in these two cases:
1. function name <--> function name
2. function's parameter name <--> function name
So for example if you try to compile this:
Code: Select all
// scripts/textcmd/gm/myscript.src
use uo;
program my_script(target)
sendsysmessage(target, "you wrote .myscript and you have at least gm rights.");
endprogram
Code: Select all
Compiling: <POLPATH>\scripts\textcmd\gm\myscript.src
Expected arguments or right-paren in program arglist, got 'Func(2,0): target'
Error detected in program body.
Error occurred at <POLPATH>\textcmd\gm\myscript.src, Line 4
PS: obviously it won't tell you the same if if finds two arguments of two different functions in the scope having the same name.. the conflict matching occurs in these two cases:
1. function name <--> function name
2. function's parameter name <--> function name
Thanks gang.
The Search function DOES work.