Got problems over naming function "PlaySound"

Bug reports and feature requests. New features can only be added to the current development version. Bug-fixes may be back-ported.

Current release: 099 / Current development: 100
Post Reply
Daviex
Neophyte Poster
Posts: 39
Joined: Sat Sep 20, 2008 3:53 am
Location: Sicily, Italy

Got problems over naming function "PlaySound"

Post by Daviex »

Hello

I'm trying to upgrade my server to last version of POL099 (awesome work guys, really!) and I got a problem over a script.

While trying to compile, it gave me this error:

Code: Select all

Error reading function declaration in module uo
After alot of analysis over my code I found my bug:
I had a function called "PlaySound" and, somehow, it seem to collide with module uo.em function "PlaySoundEffect" or "SendOverallSeason" (this last one has a parameters that is called *playsound*).

I don't know if this should be a normal behavior for ecompile, but I don't think so...

Thanks again for your work!
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: Got problems over naming function "PlaySound"

Post by Yukiko »

Funny you should have that problem. I recently had that same issue with the same name. Hehe we must have the same script :) I think my problem was a variable of the same name.

Yes it is an issue with the way eCompile parses identifiers. You cannot have more than one function or variable with the same name. There will likely not be any way to resolve duplicate function names but hopefully the Core developers will find a way to resolve variables having the same names as functions.
Daviex
Neophyte Poster
Posts: 39
Joined: Sat Sep 20, 2008 3:53 am
Location: Sicily, Italy

Re: Got problems over naming function "PlaySound"

Post by Daviex »

Yukiko wrote: Wed Feb 14, 2018 9:30 am Funny you should have that problem. I recently had that same issue with the same name. Hehe we must have the same script :) I think my problem was a variable of the same name.

Yes it is an issue with the way eCompile parses identifiers. You cannot have more than one function or variable with the same name. There will likely not be any way to resolve duplicate function names but hopefully the Core developers will find a way to resolve variables having the same names as functions.
Ahahah probably :D
Well, let's hope they will fix this out! Is not a so annoying problem when you find out, but when you need to do an upgrade and it gives you this error without any advice of what function is giving this problem is really bad!
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: Got problems over naming function "PlaySound"

Post by Yukiko »

Yes. ECompile can definitely use an improved error regarding upgrade in a lot of places. If it reported both function locations that would be a good solution. Then you would have a clue where to look for the problem.
Post Reply