• Post Reply Bookmark Topic Watch Topic
  • New Topic

random  RSS feed

 
chris barr
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


in that code i get the error that says "Mobnum = mob.nextInt(3) + (pl-3);"
it tells me that i can't use the "+" operator on mob.nextInt and pl

i get that error both times i try to add to mob.nextInt

and the third error that i get is "operator + cannot be applied to int,Creatures"

not eniterly sure what that means

and the last error i get is "incompatible types on line 326 ... that is the line with "Mobnum = mob.nextInt(3) + pl-3);" ... all values are int that i can see so i don't know what the problem is .... any ideas on how to help���???
 
Rusty Shackleford
Ranch Hand
Posts: 490
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
pl is a reference to Creatures, which is an object not an integer.
 
chris barr
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you ... that fixed it ... lol .. simple mistake..
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!