Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?
You are not logged in.
Pages: 1
Topic closed
Lock, fixed.
thanks zoey aaaaaaaaaaaand thanks latif for the avatar
Offline
It's already a int,string so I don't have .name
Edited first post
thanks zoey aaaaaaaaaaaand thanks latif for the avatar
Offline
It means the player was in game, but not present in you Dictionary "players". So you now have to figure out why
Offline
Shouldn't it be adding them in "add"?
thanks zoey aaaaaaaaaaaand thanks latif for the avatar
Offline
This is an EEPhysics error, I had the same error with add
Thank you eleizibeth ^
I stack my signatures rather than delete them so I don't lose them
Offline
Will it be fixed?
thanks zoey aaaaaaaaaaaand thanks latif for the avatar
Offline
Thank you eleizibeth ^
I stack my signatures rather than delete them so I don't lose them
Offline
Ok then what do I do to fix the issue?
thanks zoey aaaaaaaaaaaand thanks latif for the avatar
Offline
it might be calling "say" earlier that the "add" message.
edit, copied your code, worked fine for me.
are you sure that you sent init2 after the initialisation has been done?
if you can read this....good for you
Offline
Yes I do
case "init":
{
conn.Send("init2");
}
Edit: Edited 1st post
thanks zoey aaaaaaaaaaaand thanks latif for the avatar
Offline
I'm not sure if it has something to do with the error or that I'm right (I don't use switches very often), but I think you shouldn't add the braces {} (Please correct me if I'm wrong...). I think your switch needs to look like this:
switch(m.Type)
{
case "init":
con.Send("init2");
break;
case "add":
players.Add(m.GetInt(0), m.GetString(1));
break;
// More Code
}
Offline
I'm not sure if it has something to do with the error or that I'm right (I don't use switches very often), but I think you shouldn't add the braces {} (Please correct me if I'm wrong...). I think your switch needs to look like this:
switch(m.Type) { case "init": con.Send("init2"); break; case "add": players.Add(m.GetInt(0), m.GetString(1)); break; // More Code }
It's the same thing, just looks neater to me.
thanks zoey aaaaaaaaaaaand thanks latif for the avatar
Offline
Its fixed
if you can read this....good for you
Offline
912468 wrote:I'm not sure if it has something to do with the error or that I'm right (I don't use switches very often), but I think you shouldn't add the braces {} (Please correct me if I'm wrong...). I think your switch needs to look like this:
switch(m.Type) { case "init": con.Send("init2"); break; case "add": players.Add(m.GetInt(0), m.GetString(1)); break; // More Code }
It's the same thing, just looks neater to me.
It isn't the same thing, i'll give you an example:
switch (arg[0]){
case "hi":
Player p = players[id];
say(p.name + ": hi!");
break;
case "bye":
Player p = players[id]; // This will trigger error because "p" is alredy declared, when using brackets it wont trigger error.
say(p.name + ": bye!");
break;
}
Offline
Xfrogman43 wrote:912468 wrote:I'm not sure if it has something to do with the error or that I'm right (I don't use switches very often), but I think you shouldn't add the braces {} (Please correct me if I'm wrong...). I think your switch needs to look like this:
switch(m.Type) { case "init": con.Send("init2"); break; case "add": players.Add(m.GetInt(0), m.GetString(1)); break; // More Code }
It's the same thing, just looks neater to me.
It isn't the same thing, i'll give you an example:
switch (arg[0]){ case "hi": Player p = players[id]; say(p.name + ": hi!"); break; case "bye": Player p = players[id]; // This will trigger error because "p" is alredy declared, when using brackets it wont trigger error. say(p.name + ": bye!"); break; }
Thanks for clarification.
thanks zoey aaaaaaaaaaaand thanks latif for the avatar
Offline
locked on request of owner.
"Sometimes failing a leap of faith is better than inching forward"
- ShinsukeIto
Offline
Pages: 1
Topic closed
[ Started around 1715001820.3523 - Generated in 0.045 seconds, 12 queries executed - Memory usage: 1.55 MiB (Peak: 1.73 MiB) ]