❔ FRUSTRATION
I'm having the worst time trying to figure out why I'm getting a Error while compiling: IslandPatrol.cs(126,12): error CS1525: Unexpected symbol `void' error.
I've looked on the lines specifically, and I can't exaclty diagnose the problem and it's driving me insane
I'll provide some code that comes a little before and a little after
25 Replies
I think it has something to do with the start event logic but i'm not sure
Try and include the line numbers in your screenshots so people can see where line 126 is
oh yes sorry about that
there you go
The first thing that jumps out at me is you have two
LoadConfigValues
methodsthat's a problem too. Also you have a
}
at line 100 and at 102, so probably defining methods outside of a classstill getting errors after fixing both of those issues
i commented out the lower loadconfigvalues method as well and it still didnt work
Are you able to $paste the full class and provide the full error message?
If your code is too long, you can post to https://paste.mod.gg/ and copy the link into chat for others to see your shared code!
sure, give me a second
It looks like it's what Tvde said, your
cmdForceEvent
method onwards are sat outside of your IslandPatrol
classoh is it really
shit i didnt even notice lol
i moved it back up to but it still gives the same error unless i did it wrong
Did you move all the methods below it as well?
No, i only moved
All methods need to be in a class
well i put the method within the
IslandPatrol
class and [ConsoleCommand
flashes green for a second and then goes back to blue
which probably means it out of the class but i cant figure out how to keep it in IslandPatrol
All i need to do is put it within the }
right?Yes, just make sure all the methods are within the
{}
of the classit shows it inside of IslandPatrol
but i still get this error
Error while compiling: IslandPatrol.cs(133,12): error CS1525: Unexpected symbol 'void
Make sure ALL the methods in that file are inside it, not just that one
ok gimme a second
yeah i moved all my methods in the
IslandPatrol
class and it works perfectly thanks
i was so confused because all the methods were correct so it has been pretty frustrating for the past 3-4 hoursCan understand the annoyance, one of those things you shouldn't forget now at least!
but thanks for being a helping hand i'll make sure to keep this in mind
oh yeah cant forget this
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.