Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: probably a simple question  (Read 4780 times)

0 Members and 1 Guest are viewing this topic.

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 196
    • View Profile
probably a simple question
« on: March 18, 2009, 12:45:55 AM »

probably going to appear a naive idiot with this question.

Are there any limitations as to where I can place a function - I can create a function perfectly well in the screen-init script, but if I try and create the same function in a script which is linked to an entity I get a compiler error, any thoughts as to what I am doing wrong I

the function is very simple

function xray ()
{
Game.MSG("Hello");
return:
}

xray();

Logged

FogGobbler

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 228
    • View Profile
Re: probably a simple question
« Reply #1 on: March 18, 2009, 08:16:02 AM »

Code: WME Script
  1. function xray ()
  2. {
  3. Game.MSG("Hello"); <--- It should be Game.Msg("Hello");
  4. return: <----  is that a colon? Should be a semicolon
  5. }
  6.  
  7. xray();
  8.  
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: probably a simple question
« Reply #2 on: March 18, 2009, 08:19:38 AM »

Also if you say you're getting an error, always say WHAT error.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 196
    • View Profile
Re: probably a simple question
« Reply #3 on: March 21, 2009, 09:50:03 AM »

sorry  the : was a typo problem also persists with a semi-colon - the error message was a standard could not complite the script - this was taken from the logfile, if there is a respository with a more detailed error message I could look that up - In retrospect I am now wondering if the problem was due to a missing brace somewhere, in any event thank you for the interest.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: probably a simple question
« Reply #4 on: March 21, 2009, 10:00:51 AM »

Sorry, but if you don't give us the EXACT error message (which contains line number, btw) and the EXACT script that gives you the error, I don't think anyone will be able to help you.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.04 seconds with 21 queries.