Jump to content
  • 0

My function suddenly becomes undeclared


VagrantAI

Question


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   0
  • Joined:  12/16/12
  • Last Seen:  

So, there's a problem. I have a bunch of events, which are designed to have similiar structure. But there's a one trouble, that infects all my events. Some functions are just refusing to work. Here's the smallest event of my set and screenshot with errors.

post-12631-0-53207500-1356776618_thumb.png

I tried to do several bugfixes, such as redacting these function in the places, that i thought were troubled. I tried to call the functions with the callfunc and it worked well. Then i tried to rename them and seems it worked just once. So, is there a way to fix it without breaking the structure and using callfunc, or is it just a bug? I wonder if i was doing smth. wrong with my scripts. r17028, sry for my english.

Edited by VagrantAI
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

Then i tried to rename them and seems it worked just once.

Did your functions work when the names did not have dash ?

evt_prize()

04gate()

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   0
  • Joined:  12/16/12
  • Last Seen:  

Then i tried to rename them and seems it worked just once.

Did your functions work when the names did not have dash ?

evt_prize()

04gate()

Yes, the dash did all the errors. Thanks. But is it a bug or just a restriction?

Edited by VagrantAI
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

You're welcome!

It's a restriction (working as intended)

I am guessing that function names can only contain alphanumeric characters (a-ZA-Z0-9) and underscore. The dash is causing errors because "evt-prize()" could be interpreted as "the value of the permanent char variable evt, MINUS the return value of the prize() function".

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   0
  • Joined:  12/16/12
  • Last Seen:  

The dash is causing errors because "evt-prize()" could be interpreted as "the value of the permanent char variable evt, MINUS the return value of the prize() function".

Oh, i see. I would never thought of that.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...