Raised This Month: $51 Target: $400
 12% 

compile error 180


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
eliteroyal
AlliedModders Donor
Join Date: Dec 2016
Location: Moldova
Old 03-19-2021 , 12:38   compile error 180
Reply With Quote #1

Hi, im trying to compile the plugin shop_laseraim plugin but i get error 180, expected void but got int, i have no ideea how to sourcepawn, can you help me pls? thank you

i will leave the includes necesary for compilation
Attached Files
File Type: sp Get Plugin or Get Source (shop_laseraim.sp - 34 views - 7.9 KB)
File Type: zip necessary for comp.zip (76.1 KB, 29 views)
__________________
PEACE FROM MOLDOVA
eliteroyal is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 03-19-2021 , 16:40   Re: compile error 180
Reply With Quote #2

change the "int" to "void" in the method header.

here is a compiling version without issues, you can compare the differences in an online diff to understand.

Change:

public int Shop_OnAuthorized
to
public void Shop_OnAuthorized

public int Shop_Started
to
public void Shop_Started


If you say that a method is "int <MethodName>", you should return some int value in the method call.

Example:

PHP Code:
public int Shop_OnAuthorized
{
    return 
0;

Attached Files
File Type: sp Get Plugin or Get Source (shop_laseraim.sp - 29 views - 7.9 KB)
__________________

Last edited by Marttt; 03-19-2021 at 16:40.
Marttt 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 05:30.


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