Passing string to CreateTimer Function
Hello. I have this error: error 035: argument type mismatch (argument 3)
I am trying to pass a string variable to the createTimer function. Code:
new String:steamid[25]; Not working: Code:
public Action saveBan(Handle timer, char[] steamid) { ( error 100: function prototypes do not match) Code:
public Action saveBan(Handle timer, const char[] steamid) { |
Re: Passing string to CreateTimer Function
|
Re: Passing string to CreateTimer Function
|
Re: Passing string to CreateTimer Function
https://sm.alliedmods.net/new-api/timers/Timer
The second parameter must be any, Handle, or simply absent. Who told you that char[] would work? |
Re: Passing string to CreateTimer Function
You could use GetSteamAccountID (int) instead.
|
Re: Passing string to CreateTimer Function
It does not work because it needs to be:
PHP Code:
|
Re: Passing string to CreateTimer Function
the prototype does not match, the function expects a variable, not a array
|
Re: Passing string to CreateTimer Function
Maybe there is more efficient method, but this should work
PHP Code:
|
Re: Passing string to CreateTimer Function
Quote:
|
All times are GMT -4. The time now is 23:24. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.