Prototypes error
Why do I get this error:
Code:
error 100: function prototypes do not match.PHP Code:
PHP Code:
EDIT: I tried with CreateTimer, same results PHP Code:
|
Re: Prototypes error
I guess it's not Create[Data]Timer, but Timer_Entity function that's causing errors. What's the prototype of Timer_Entity function?
|
Re: Prototypes error
Quote:
PHP Code:
|
Re: Prototypes error
Not 100% sure how typesets work (never written a SourceMod plugin), but looks like you will have to do:
PHP Code:
|
Re: Prototypes error
Quote:
and btw can I still use other methodmaps instead of using Handle ? one more thing, will DataPack entityInfo get created ? because when I used entityInfo.DataPack() I got an error. |
Re: Prototypes error
Right, Timer isn't a methodmap, but a typeset - it just specifies the function prototype. Think of it as delegates in C#. If you look at CreateTimer prototype, it looks like:
PHP Code:
The Timer typeset specifies one of its prototypes as: PHP Code:
PHP Code:
|
Re: Prototypes error
Thank you sir! what about the entityInfo.DataPack() instead of entityInfo = CreateDataPack(); ?
|
Re: Prototypes error
Not sure about what you are asking, but entityInfo.DataPack() doesn't even seem like a valid thing to do (DataPack() is a constructor I believe). To create a DataPack I believe you would either do
PHP Code:
PHP Code:
|
Re: Prototypes error
Lol, I forgot that too wtf XD, thanks for reminding :)
|
Re: Prototypes error
I should note, CreateDataTimer creates a DataPack handle for you and sends it off to the timer and once the function is over, the variable you passed for the datapack param is giving said handle that you do the WriteCell on(after CreateDataTimer execution).
Klippy, typeset is similar in funcnum. |
| All times are GMT -4. The time now is 08:50. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.