Raised This Month: $32 Target: $400
 8% 

Need help with compileing my sp plugin.


Post New Thread Reply   
 
Thread Tools Display Modes
Jackkkk
Junior Member
Join Date: Jun 2020
Location: Sweden
Old 06-14-2020 , 12:45   Re: Need help with compileing my sp plugin.
Reply With Quote #21

thanks
Jackkkk is offline
Jackkkk
Junior Member
Join Date: Jun 2020
Location: Sweden
Old 06-14-2020 , 12:47   Re: Need help with compileing my sp plugin.
Reply With Quote #22

but now i got new errors and more.
Jackkkk is offline
Weetabix
Member
Join Date: Feb 2017
Location: United Kingdom
Old 06-14-2020 , 13:19   Re: Need help with compileing my sp plugin.
Reply With Quote #23

Quote:
Originally Posted by Jackkkk View Post
but now i got new errors and more.
Menu is globally defined already. You need to change the variable name to something else or lowercase "menu".

This:
PHP Code:
Menu menu = new Menu(Menu_Callback
Not:
PHP Code:
Menu Menu = new Menu(Menu_Callback
If this is your first experience with code. I highly suggest watching some BASIC programming tutorials on youtube. C++ will probably be the best since sourcemod is written in it.

Last edited by Weetabix; 06-14-2020 at 13:22.
Weetabix is offline
Jackkkk
Junior Member
Join Date: Jun 2020
Location: Sweden
Old 06-14-2020 , 13:48   Re: Need help with compileing my sp plugin.
Reply With Quote #24

Yes, this is my first time coding so im having a lot of problems

Thanks for the help!
Jackkkk is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 06-15-2020 , 04:59   Re: Need help with compileing my sp plugin.
Reply With Quote #25

Quote:
Originally Posted by Jackkkk View Post
okay i will describe my problem as good as possible.

I made my plugin with the hellp of acouple youtube videos and then it was time for compiling and when i compiled my plugin with spedit i got these errors:

error 107: cannot call methods on a function
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 190: too many error messages on one line

i attached my plugin at the bottom for you to look.

Thats all i did.
Hm, that error was already addressed in this thread, didn't you try what was suggested or even check out the fixed script posted by Kellan123?

When looking at all the differences between the lines causing errors in your script and the one they posted you'd be able get good clues about what went wrong.

I was asking about the other plugins you were having problems compiling and the compiler version you're trying to compile them with. The SourcePawn language had some breaking changes over the years and some old plugins might not compile on new compilers same for new plugins not compiling on old compilers. That's why the compiler version is important for you to consider when debugging other people's code.

This feels like you're not even trying, sorry.
__________________
Peace-Maker is offline
Jackkkk
Junior Member
Join Date: Jun 2020
Location: Sweden
Old 06-15-2020 , 05:59   Re: Need help with compileing my sp plugin.
Reply With Quote #26

Hi, i did check out the fix from kellan123 but after i "fixed" the errors i got new errors and more. So now i have new errors again.

error 001: expected token: ";", but found "-identifier-"
error 017: undefined symbol "menu"
error 017: undefined symbol "menu"
error 017: undefined symbol "menu"
error 017: undefined symbol "menu"
error 001: expected token: ";", but found "return"
warning 204: symbol is assigned a value that is never used:
"Menu" warning 217: loose indentation
Done

So i tried to search these errros up but i couldnt get answers that worked for me. The thing is that im just getting new errors everytime im fixing the errors at the time.
Jackkkk is offline
Weetabix
Member
Join Date: Feb 2017
Location: United Kingdom
Old 06-15-2020 , 06:57   Re: Need help with compileing my sp plugin.
Reply With Quote #27

I did what I told you and it compiles fine. (File attached)

Once again, please learn basic C++ or something before progressing.
Attached Files
File Type: sp Get Plugin or Get Source (VIP JACK.sp - 135 views - 792 Bytes)
Weetabix is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 06-15-2020 , 07:07   Re: Need help with compileing my sp plugin.
Reply With Quote #28

But.. those aren't new errors? They are the exact same you posted a screenshot of earlier and Weetabix told you how to fix it and they are fixed in the script Kellan123 posted as well. If you ask questions and don't understand the answers, you might ask the wrong questions. Start by learning basics about typed programming languages and the syntax of sourcepawn before posting the same question again.

You have to define variables before being able to use them in sourcepawn. So whatever you changed the name of the Menu variable to is not "menu" as used below in the code.

PHP Code:
Menu whatever = new Menu(Menu_Callback)
whatever.SetTitle("VIP Menu :)"); 
"Menu" is the type and "whatever" is the variable name you choose and use later in your code.
__________________
Peace-Maker is offline
Jackkkk
Junior Member
Join Date: Jun 2020
Location: Sweden
Old 06-15-2020 , 08:46   Re: Need help with compileing my sp plugin.
Reply With Quote #29

Thanks, i will try to learn i bit more from vids and stuff before asking questions here, but thank you so much for the help! It compiles fine now btw

Last edited by Jackkkk; 06-15-2020 at 08:47.
Jackkkk is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:11.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode