Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
i used inventories as makeshift variables, but now i need to work with pure variables since i need them to be negative
in the head part of the class i can only do
Unexpected '='
Expecting '-' or '+' or '++' or '--' or '(' or identifier or string constant
etc
how do i stop this from happening?
i have looked in mods and i don't see any big ol thing i might be missing
entire code snippet: https://pastebin.com/u83yiPwL
yeah the variable goes through the postbeginplay but as soon as i try to change it zdoom freaks out
can i only change variables in functions? the { a = 0; } i put in there is in a weapon state
i have been trying all day to get the property thing to work but it gives me the same thing as { a = 1; }(for the ps i do know that int default to 0 but i gave that as an example)
Script error, "TGC.pk3:classes/test.zs" line 5:
Unexpected '='
Expecting '-' or '+' or '++' or '--' or '.' or '(' or ';' or identifier or string constant or integer constant or 'super' or '~' or '!' or 'sizeof' or 'alignof' or unsigned constant or float constant or name constant or 'false' or 'true' or 'null'
Script error, "TGC.pk3:classes/sweps/slot2.zs" line 51:
Unexpected '='
Expecting '-' or '+' or '++' or '--' or '(' or identifier or string constant or integer constant or 'super' or '~' or '!' or 'sizeof' or 'alignof' or unsigned constant or float constant or name constant or 'false' or 'true' or 'null'