expected unqualified-i before '.' token - C struct -


I am coding a Pokemon fight and using structs to define tricks and individual pokemon I try to start a straight variable, it throws the error above and I can not see anything wrong with syntax in the context of missing semicolons. Any light to be shade will be highly appreciated. Here's a snippet:

  Type-Effect Structure Level {string name; Int power; Int accuracy; String type; } Qik_attack, pin_missle, shadow_ball, thunder, mental, fast, earthquake, ice meltdown; Qik_attack.name = "Quick ATke"; Qik_attack.power = 40; Qik_attack.accuracy = 100; Qik_attack.type = "normal";  

this

  typedef struct move {.. . Qik_attack  

defines qik_attack as a type of name.

but

  qik_attack.name = "Quick ATK";  

You are using qik_attack as a variable.

Just remove that typedef and try again.

Of course, you should put those functions in the function.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

lua - HowTo create a fuel bar -