Error when adding entry to admin menu
Hello,
I get this error when trying to compile: error 181: function argument named 'topmenu' differs from prototype This is the code it's referring to: PHP Code:
What does that error actually mean? I was following this tutorial. |
Re: Error when adding entry to admin menu
what version is your compiler?
|
Re: Error when adding entry to admin menu
Quote:
|
Re: Error when adding entry to admin menu
See that here : https://sm.alliedmods.net/new-api/to...opMenu/TopMenu
The tutorial is old so the syntax may changed. (Maybe) Just look at the new api when you have an error like that. |
Re: Error when adding entry to admin menu
Not sure what to do with that information, tbh xd
|
Re: Error when adding entry to admin menu
Quote:
If you used the latest compiler of sourcemod, and you tried the code of this tutorial, it will make an error like that. Since this tutorial is old, the syntax is old also. To resolve that, use the new syntax which is in the link I gave you. The last modification on the tutorial was in August 2015... |
Re: Error when adding entry to admin menu
Someone attempted to update the sample code on that wiki article, but they did a poor job of it. They introduced the error you're getting and still didn't really use the new methodmaps for topmenus. I'll see if I can make a better sample sometime today.
In the meantime, you can try clicking on "view history" on the top of the wiki article and seeing if an older version before the 2015 edits work, though it'll use the older style. Quote:
Quote:
|
Re: Error when adding entry to admin menu
Quote:
|
Re: Error when adding entry to admin menu
Here's a sample that makes a category and adds one item. I tried to explain what's going on.
PHP Code:
|
Re: Error when adding entry to admin menu
Quote:
|
All times are GMT -4. The time now is 16:56. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.