Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Problem...please help?
SonOfLiberty796 Offline
Senior Member

Posts: 371
Threads: 39
Joined: Aug 2011
Reputation: 2
#3
RE: Script Problem...please help?

(08-10-2011, 07:22 AM)palistov Wrote:
(08-10-2011, 06:14 AM)Xvideogamer720X Wrote: void SetMessage(string& asTextCategory, string& asTextEntry, float afTime);
{
SetMessage("MessageDisplay", "Message_nighttime_Name", 5.0f);
}

Improper name and signatures there (bolded text). Looks like a copy-paste typo to me. Also, the semicolon after the void function's name causes an error. You also need to add an OnStart() function and an OnLeave() function.

Alright then ill try that out right now. Oh by the way, i do have those OnStart and OnLeave functions (except onstart was onenter...but ill change that) its just i didnt include it in the text (to make the text shorter, because i think copying the WHOLE script is too much...isnt it? :p)

Quote:Also, I saw you added item callbacks and such in OnEnter. This is a bad idea, since if the player leaves the area and returns later on, they'll be able to use the items again, perhaps giving them unlimited sanity or allowing them to do other weird things. Put these callback declarations into your OnStart function instead. This way the player will only be able to use an item once (unless you add another callback with script).

Ohhhhhhhhhhhhh that explains why everyone uses OnStart! Thank you so much for explaining! Smile

EDIT1: Thank you soooooo much! It worked! Gah, i hate it when i cant find those small problems in the scripts (and trust me i was looking for them) and all the trouble was caused by the darn ";" sign -_- and not to mention i have other void commands and i could have just looked at them and see that they dont have the ";" sign -_- :p well anyways another problem solved thanks to you, friend!
(This post was last modified: 08-10-2011, 07:51 PM by SonOfLiberty796.)
08-10-2011, 07:42 PM
Find


Messages In This Thread
RE: Script Problem...please help? - by palistov - 08-10-2011, 07:22 AM
RE: Script Problem...please help? - by SonOfLiberty796 - 08-10-2011, 07:42 PM



Users browsing this thread: 1 Guest(s)