Boom271 Posted March 21, 2012 Share Posted March 21, 2012 (edited) I'm just testing out different scripts for practice and I keep getting an EOF issue with the first line. I'm getting the compiler error at (13,0): Missing EOF at 'if' if x > (99) (Game.GetPlayer().AddItem(BearClaw)) (Game.GetPlayer().RemoveItem(Gold, 100)) elseif x < (100) (Debug.MessageBox("You don't have enough gold.")) endif I used this to set X. x = (Game.GetPlayer() .GetGoldAmount) Edited March 21, 2012 by Boom271 Link to comment Share on other sites More sharing options...
tunaisafish Posted March 21, 2012 Share Posted March 21, 2012 EOF == Event Or Function The search feature will show other threads in the forum where this is mentioned. Link to comment Share on other sites More sharing options...
fg109 Posted March 21, 2012 Share Posted March 21, 2012 x = Game.GetPlayer().GetGoldAmout() If you ask for help with compiling errors, you should really post what the compiler says (it gives line and column number). Link to comment Share on other sites More sharing options...
Boom271 Posted March 21, 2012 Author Share Posted March 21, 2012 Alright ill look.I Googled it and found one topic with no answer but ill try looking through the forums. Link to comment Share on other sites More sharing options...
DeadlyCobraXXX Posted March 21, 2012 Share Posted March 21, 2012 (edited) this appears to be the problem. x = (Game.GetPlayer() .GetGoldAmount)you have a space here^ and no cast ^ it needs to be x = (Game.GetPlayer().GetGoldAmount()) and if that doesn't work add an extra = sign for the hell of it and try it. x == (etc. Edited March 21, 2012 by DeadlyCobraXXX Link to comment Share on other sites More sharing options...
elseagoat Posted March 21, 2012 Share Posted March 21, 2012 this appears to be the problem. x = (Game.GetPlayer() .GetGoldAmount)you have a space here^ and no cast ^ it needs to be x = (Game.GetPlayer().GetGoldAmount()) and if that doesn't work add an extra = sign for the hell of it and try it. x == (etc. I may be wrong, but I am almost positive you only use == within comparisons like if (something == somethingelse) while a single = is used to assign a value to a variable So I would wager your first suggestion is correct Link to comment Share on other sites More sharing options...
DeadlyCobraXXX Posted March 21, 2012 Share Posted March 21, 2012 yeah, i'm not sure either, that's why i said if the above didn't work still, then try that. Link to comment Share on other sites More sharing options...
Boom271 Posted March 21, 2012 Author Share Posted March 21, 2012 I tried replacing x = (Game.GetPlayer() .GetGoldAmount) with x = (Game.GetPlayer().GetGoldAmount()) and didn't have much luck so i'm just going to rewrite everything. But thank you everyone that tried to help =) Link to comment Share on other sites More sharing options...
DeadlyCobraXXX Posted March 21, 2012 Share Posted March 21, 2012 no need, PM me the exact script that you have. I'll have it fixed for you in a minute, or tell you the problem of why it isnt working. Link to comment Share on other sites More sharing options...
Boom271 Posted March 22, 2012 Author Share Posted March 22, 2012 no need, PM me the exact script that you have. I'll have it fixed for you in a minute, or tell you the problem of why it isnt working. Thank you i re-wrote and it works fine... I had a misunderstanding with the properties also, so that probably didn't help. =p But i got it working Link to comment Share on other sites More sharing options...
Recommended Posts