setting conditions for variables to be changed for each map
How would I go about making a variable that would hold the map name in it? I can't seem to get the condition right. If someone could tell me that would be very helpfull. Here is what I have so far:
get_mapname(mapname,32) Code:
|
use
if(equal(MyString,"de_aztec")) |
Isn't there already a plugin to use different configuation files for different maps?
|
Firstly, you have to declare the variable. Secondly, the = operator sets a value, it doesn't compare a value. And thirdly, you can't use the == operator in Small to compare strings.
Oh, and fourthly, no need to use float(integer), just put it as a float in the first place. Code:
|
Thank you very much
|
hmm, when I tried to compile that it gave me these two errors:
/home/users/amxmodx/tmp/phpOjp12V.sma(39) : error 021: symbol already defined: "get_mapname" /home/users/amxmodx/tmp/phpOjp12V.sma(40) : error 010: invalid function or declaration Any ideas about what to do? |
You didn't put it in a public function?
|
Ah, that fixed part of the problem but its still giving me tag mismaches.
|
oh man, I thought everything was going well here until I suddenly got 27 errors, now I'm stuck. Please tell me whats wrong with the last few menus towards the bottom?
|
Your tag mismatches comes from creating your c* variables as integers but assigning them as floats. You have to create them as Float:c* to make them a float.
|
| All times are GMT -4. The time now is 14:15. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.