SA-MP Forums Archive
invalid function call, not a valid address - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: invalid function call, not a valid address (/showthread.php?tid=217115)



invalid function call, not a valid address - Steven Paul - 27.01.2011

I got these error's when i compile


Код:
F:\CR\gamemodes\larp.pwn(14337) : error 012: invalid function call, not a valid address
F:\CR\gamemodes\larp.pwn(14337) : warning 215: expression has no effect
F:\CR\gamemodes\larp.pwn(14337) : error 001: expected token: ";", but found ")"
F:\CR\gamemodes\larp.pwn(14337) : error 029: invalid expression, assumed zero
F:\CR\gamemodes\larp.pwn(14337) : fatal error 107: too many error messages on one line
Line 14337

pawn Код:
new password2 = (non_hash(string))(inputtext);

Any help


Re: invalid function call, not a valid address - PeteShag - 27.01.2011

What is non_hash ?


Re: invalid function call, not a valid address - Steven Paul - 27.01.2011

pawn Код:
stock non_hash(const string[])
    return string;



Re: invalid function call, not a valid address - Retardedwolf - 27.01.2011

What are you trying to do? Using a function that just returns itself?

Try new password2 = inputtext;


Re: invalid function call, not a valid address - Steven Paul - 27.01.2011

i tried it but the password all comes to 0 in user.txt

EDIT :I want to un hashed the password


Re: invalid function call, not a valid address - PeteShag - 27.01.2011

Sorry but it doesn't make any sense or I am so stupid to understand it.


Re: invalid function call, not a valid address - Steven Paul - 27.01.2011

Quote:
Originally Posted by Retardedwolf
Посмотреть сообщение
What are you trying to do? Using a function that just returns itself?

Try new password2 = inputtext;
i got whole bunch of errors


codes :


pawn Код:
(14337) new password2 = inputtext;
(14360) new password2 = inputtext;
(14419) new password2 = inputtext;
(14448) new password2 = inputtext;
(14477) new password2 = inputtext;

Errors:

Код:
F:\CR\gamemodes\larp.pwn(14337) : error 033: array must be indexed (variable "-unknown-")
F:\CR\gamemodes\larp.pwn(14360) : error 033: array must be indexed (variable "-unknown-")
F:\CR\gamemodes\larp.pwn(14419) : error 033: array must be indexed (variable "-unknown-")
F:\CR\gamemodes\larp.pwn(14448) : error 033: array must be indexed (variable "-unknown-")
F:\CR\gamemodes\larp.pwn(14477) : error 033: array must be indexed (variable "-unknown-")
F:\CR\gamemodes\larp.pwn(14506) : error 033: array must be indexed (variable "-unknown-")
F:\CR\gamemodes\larp.pwn(14536) : error 033: array must be indexed (variable "-unknown-")
F:\CR\gamemodes\larp.pwn(14560) : error 033: array must be indexed (variable "-unknown-")
F:\CR\gamemodes\larp.pwn(14589) : error 033: array must be indexed (variable "-unknown-")
F:\CR\gamemodes\larp.pwn(14619) : error 033: array must be indexed (variable "-unknown-")
F:\CR\gamemodes\larp.pwn(29664) : error 033: array must be indexed (variable "-unknown-")
F:\CR\gamemodes\larp.pwn(30426) : error 033: array must be indexed (variable "-unknown-")



Re: invalid function call, not a valid address - Steven Paul - 27.01.2011

do you guys need any other information?


Re: invalid function call, not a valid address - PowerPC603 - 27.01.2011

Quote:

new password2 = (non_hash(string))(inputtext);

Your non_hash function just returns the string you gave it, so we can replace it:
Код:
new password2 = (string)(inputtext);
What I see here, is really strange to me.
2 variables after eachother, and both enclosed by ().

Didn't you mean to do this:
Код:
new password2 = (non_hash(inputtext));
Are you sure you have inputtext declared as a string?
And you declared "password2" as an integer, not a string, so saving a string in password2 isn't going to work.
Код:
new password2[128] = (non_hash(inputtext));



Re: invalid function call, not a valid address - HyperZ - 27.01.2011

pawn Код:
stock non_hash(const string[]) return string[/*string array*/];