47 error ("variables cannot be string\n"); |
46 error ("variables cannot be string\n"); |
48 |
47 |
49 // Check that the variable is valid |
48 // Check that the variable is valid |
50 if (find_command_by_name (name)) |
49 if (find_command_by_name (name)) |
51 error ("name of variable-to-be `%s` conflicts with that of a command", name.chars()); |
50 error ("name of variable-to-be `%s` conflicts with that of a command", name.chars()); |
52 |
|
53 if (IsKeyword (name)) |
|
54 error ("name of variable-to-be `%s` is a keyword", name.chars()); |
|
55 |
51 |
56 if (g_GlobalVariables.size() >= g_max_global_vars) |
52 if (g_GlobalVariables.size() >= g_max_global_vars) |
57 error ("too many global variables!"); |
53 error ("too many global variables!"); |
58 |
54 |
59 for (int i = 0; i < g_GlobalVariables.size(); i++) |
55 for (int i = 0; i < g_GlobalVariables.size(); i++) |