Nahchito Posted March 31, 2010 Author Share Posted March 31, 2010 Hi guys, I've started again my project and now after a few source edits any scriptednpc gives me this error> Wrong number of arguments or property assignment not valid![](http://bb.xieke.com/files/error%201.bmp)I've tried opening the server with the vb6 and bumping the error tu debug it, but it doesnt hightlight anysection, it only gives the error.Any ideas?I can send you the server source..thanks Link to comment Share on other sites More sharing options...
ilovelisa Posted April 2, 2010 Share Posted April 2, 2010 My guess is that it has something to do in the ScriptedNPC script, like in your main?What did you add or delete from there? Link to comment Share on other sites More sharing options...
Patrick Posted April 2, 2010 Share Posted April 2, 2010 It ain't the server. It's in the main.txt or main.ess for stable. You need to look and the Sadscript in the main.txt and look for errors. Link to comment Share on other sites More sharing options...
Robin Posted April 2, 2010 Share Posted April 2, 2010 I'll point out that posting .bmp images is against the forum rules.Also, the GUI you're using is breaking the ToS which were agreed to when it was downloaded. It was in fact something I released for educational purposes. I suggest you revert back to the default GUI or create your own. Link to comment Share on other sites More sharing options...
Nahchito Posted April 2, 2010 Author Share Posted April 2, 2010 Uhm the worst part is that the Sub ScriptedNPC(index, script) section is empty.. i mean. the error happens when i create a case and i even put a simple PlayerMsg Link to comment Share on other sites More sharing options...
tommy87 Posted April 2, 2010 Share Posted April 2, 2010 Try to report exactly your own code, here.What did you write at that point? Link to comment Share on other sites More sharing options...
Nahchito Posted April 2, 2010 Author Share Posted April 2, 2010 This is my Sub```' Executes whenever a scripted NPC does an action.Sub ScriptedNPC(Index, Script) Select Case Script Case 1 If GetPlayerLevel(index) > 24 then Call PlayerMsg(Index, "Adm.: Todavia no tengo la lista para crear Gremios!", WHITE) Else Call PlayerMsg(Index, "Adm.: Solo los guerreros con suficiente experiencia pueden hacer un Gremio!", WHITE) End if Exit Sub Case Else Call PlayerMsg(Index, "No NPC script found. Please contact an admin to solve this problem.", WHITE) Exit Sub End SelectEnd Sub``` Link to comment Share on other sites More sharing options...
Nahchito Posted April 3, 2010 Author Share Posted April 3, 2010 bump Link to comment Share on other sites More sharing options...
tommy87 Posted April 4, 2010 Share Posted April 4, 2010 Sorry, where is [ Case 0 ] ??In my own [ Select Case blabla ] I always count from 0.Try to change [ Case 1 ] in [ Case 0 ] ..So, remember also to update the NPC "profile" ingame.Lemme know please. :)I hope to have helped you.> @Nacho wrote: "Bump"People have also a social life, I guess. :)No problem, nevermind. Link to comment Share on other sites More sharing options...
Nahchito Posted April 4, 2010 Author Share Posted April 4, 2010 I changed it to "Case 0" and the error came up anyways.. Link to comment Share on other sites More sharing options...
tommy87 Posted April 4, 2010 Share Posted April 4, 2010 mmm Strange, very strange.There're only a thing I can suggest you: overwrite [ If GetPlayerLevel(index) > 24 then ] with [ If GetPlayerLevel(Index) > 24 Then ] ; and [ End if ] with [ End If ] . Maybe case-sentitive? I dunno..Again, have you already tried to use [ BattleMsg ] instead of [ PlayerMsg ] ?Except these things, personally I don't see any error in that part of the code. I can only report you an alternative code:```Sub ScriptedNPC(Index, Script) Select Case Script Case 0 Call BattleMsg(Index, "This scripted NPC has no apparent use.", WHITE) Exit Sub Case 1 Dim LevelPC LevelPC = 0 + GetPlayerLevel(Index) If LevelPC > 24 Then Call PlayerMsg(Index, "MAJOR_24", WHITE) Else Call PlayerMsg(Index, "MINOR_24", WHITE) End If Exit Sub Case Else Call PlayerMsg(Index, "No NPC script found. Please contact an admin to solve this problem.", WHITE) Exit Sub End SelectEnd Sub```That code runs for me, so if you get errors .. again .. there's only a reason - as other users (here) suggest you: control your "Main.txt", and look for errors … It's long, I know but it's the only way to be sure at 100%.Which version of Eclipse are you usign? Origins or 2.7? Link to comment Share on other sites More sharing options...
Nahchito Posted April 4, 2010 Author Share Posted April 4, 2010 I'm using 2.7.I don't think the error is the code syntaxys… not matter what the code is, it gives the error anyway. Link to comment Share on other sites More sharing options...
cloudwolf00 Posted April 4, 2010 Share Posted April 4, 2010 What did you change when you edited the server and client, go over those edits and if you find anything related to npc's that you changed, double check the code, you may have made a mistake somewhere.Did you make a call to scriptednpc in your source code? If so, check that you supplied all the values the function call needs. Link to comment Share on other sites More sharing options...
Nahchito Posted April 4, 2010 Author Share Posted April 4, 2010 Ok i'll have to look around all the source, but thanks.i'll let you know Link to comment Share on other sites More sharing options...
tommy87 Posted April 5, 2010 Share Posted April 5, 2010 If I were in you, I should compare a right\untouched "Main.txt" with mine.That should reduce the time to work on it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now