Topic: [Solved] Get game name
How would i make a if statement to get game name eg.
if (game_get_name = "etc")
{
}
What is the proper code to use?
The error shows: Error, expression must be a modifiable lvalue.
PvPGN Community Forums |
forums.pvpgn.pro → [EN] The Source Code → [Solved] Get game name
How would i make a if statement to get game name eg.
if (game_get_name = "etc")
{
}
What is the proper code to use?
The error shows: Error, expression must be a modifiable lvalue.
game_get_name used without arguments?
maybe:
if (game_get_name(game) == "etc")
{
}
In C++ you can not use equal operator for const char *.
A proper example can be found in the existing code.
C++
if ( strcasecmp(game_get_name(game), "etc") ) { ... }
Lua
if (game.name == "etc") then ... end
forums.pvpgn.pro → [EN] The Source Code → [Solved] Get game name