pass origin through functions
Hello again :}
I cannot get a function to receive origins, I get compile "invalid tag" warnings. Something like this: Code:
public function(id) |
Re: pass origin through functions
Quote:
And what line is the warning on? |
Re: pass origin through functions
I don't remember exacly, but I know it is because of the sent variable !... origin... now I send only an ID and store origin in a global variable and stuff like that...
Code:
public do_something(origin[3])oh... btw, the function was called via set_task() ... I think there was the error... this is not to solve something, I already solved it through other method, it's just to know how to write things down... like parsing an array to a function via set_task()... 'cause I got a invalid tag error there :) |
Re: pass origin through functions
are you exec ing the "do_something" on a player?
If so, do this: Code:
public do_something(id, origin[3]) |
Re: pass origin through functions
Quote:
|
Re: pass origin through functions
get_user_origin expects an integer origin, not float. If you use fakemeta to get an origin, then you would be using a float.
Try this: PHP Code:
PHP Code:
|
Re: pass origin through functions
Quote:
Code:
public function(id)test.sma(15) : error 035: argument type mismatch (argument 3) (line 15 is the set_task) PS: like I said, I found another method to do this, but just to know how it's made in case I need to send an array via set_task() or something... |
Re: pass origin through functions
PHP Code:
|
Re: pass origin through functions
http://www.amxmodx.org/funcwiki.php?...task&go=search
set_task ( 1.0, "Task_Name", iTaskId, iOrigin, 3) public Task_Name(iOrigin) { } |
Re: pass origin through functions
that was it :P thanks... forgot about funcwiki :oops: :mrgreen:
-------------------------------------------------------- Quote:
Quote:
|
| All times are GMT -4. The time now is 08:55. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.