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

Error On compile my sp


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JuegosPablo
Veteran Member
Join Date: Feb 2016
Location: Gravity is a Harness
Old 07-08-2017 , 18:43   Error On compile my sp
Reply With Quote #1

Hello everygone i try to edit a sp but i have a error on compile

My Error is Error 181 on part of name,artist and music

here a photo



And Here The File
Attached Files
File Type: sp Get Plugin or Get Source (freak_fortress_2.sp - 104 views - 266.1 KB)
__________________
My Youtube Channel
Steam Profile
My Discord: JuegosPablo#0568
JuegosPablo is offline
sdz
Senior Member
Join Date: Feb 2012
Old 07-08-2017 , 20:10   Re: Error On compile my sp
Reply With Quote #2

You have two "PlayBGM" functions, unfortunately what it appears was being done/attempted by you or whoever wrote this, is not supported in SourcePawn. In other languages, this is often times referred to as overloading.

You have this at line 3157
PHP Code:
PlayBGM(clientString:music[], Float:timebool:loop=truechar[] name=""char[] artist=""
and this at line 2966
PHP Code:
PlayBGM(client
You will need to rename one of them.
Quote:
Overloading is what happens when you have two methods with the same name but different signatures.

Last edited by sdz; 07-08-2017 at 20:12.
sdz is offline
0xBatuhan
Member
Join Date: Dec 2016
Location: Turkey
Old 07-08-2017 , 20:12   Re: Error On compile my sp
Reply With Quote #3

There are 2 functions with the same name.

Go to line 3157 and rename function name ("PlayBGM") to ("PlayBGM2").
After, go to line 3222 and rename:

Code:
    PlayBGM(client, music, time, loop, name, artist);
to

Code:
    PlayBGM2(client, music, time, loop, name, artist);
Save and try.
0xBatuhan is offline
JuegosPablo
Veteran Member
Join Date: Feb 2016
Location: Gravity is a Harness
Old 07-08-2017 , 23:14   Re: Error On compile my sp
Reply With Quote #4

rename to playbgm2 work fine now but now i have another error 092 on line 3222

error 092 : number of arguments does not match definition and 2 warnings of Symbol is never used "playbgm2" and "userage"
__________________
My Youtube Channel
Steam Profile
My Discord: JuegosPablo#0568
JuegosPablo is offline
cigzag
AlliedModders Donor
Join Date: Nov 2014
Location: NZ
Old 07-09-2017 , 00:13   Re: Error On compile my sp
Reply With Quote #5

Quote:
Originally Posted by JuegosPablo View Post
rename to playbgm2 work fine now but now i have another error 092 on line 3222

error 092 : number of arguments does not match definition and 2 warnings of Symbol is never used "playbgm2" and "userage"
1 - Number of arguments means you've either gone under or over the arguments in the stock / function (or something)
2 - You havn't used playbgm2 and userage in you're code anywhere else.
cigzag 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 07:25.


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