Jump to content

ReachVariantTool error


Bount227

Recommended Posts

Hello, I am having a hard time figuring things out with these errors. I have inputted this script so many times without error but now it is pulling up "You cannot assign to a string literal". Pretty sure I got tunnel vision looking for the error and need a second set of eyes, or several. Feel free to use the script, developing a radiation script for a fallout map I am making. This is supposed to be a simple implementation to get the gamemode in a playable state before trying to create a more elaborate one.


      if current_object.timer[0] < 1 and current_object.spawn_sequence == 10 then
        inline: if current_object.timer[0] == 25 then 
           game.show_message_to(current_object.player[0], none, "*ALERT!*Radiation levels at 1 percent!")
           game.play_sound_for(current_object.player[0], timer_beep, true)
           current_object.timer[0] = 24
        end
        inline: if current_object.timer[0] == 19 then 
           game.show_message_to(current_object.player[0], none, "*ALERT!*Radiation levels at 25 percent!")
           game.play_sound_for(current_object.player[0], timer_beep, true)
           current_object.timer[0] = 18
        end
        inline: if current_object.timer[0] == 13 then 
           game.show_message_to(current_object.player[0], none, "*ALERT!*Radiation levels at 50 percent!")
           game.play_sound_for(current_object.player[0], timer_beep, true)
           current_object.timer[0] = 12
        end
        inline: if current_object.timer[0] == 7 then 
           game.show_message_to(current_object.player[0], none, "*ALERT!*Radiation levels at 75 percent!")
           game.play_sound_for(current_object.player[0], timer_beep, true)
           current_object.timer[0] = 6
        end
			end
     `if current_object.timer[0] == 1 and current_object.spawn_sequence == 10 then
        game.show_message_to(current_object.player[0], none, "*ALERT!*Radiation levels FATAL!")
        current_player.biped.kill(true)
        current_object.object[0] = no_object
        global.number[0] = 0
        current_object.timer[0] = 0
 		end 

Link to comment
Share on other sites

Nevermind, fixed it. Idk why it had a problem with this after I did the other way dozens of times

      if current_object.spawn_sequence == 10 then
				if current_object.timer[0] <= 2 then
        		inline: if current_object.timer[0] == 25 then 
           		game.show_message_to(current_object.player[0], none, "*ALERT!*Radiation levels at 1 percent!")
           		game.play_sound_for(current_object.player[0], timer_beep, true)
           		current_object.timer[0] = 24
        		end
        		inline: if current_object.timer[0] == 19 then 
           		game.show_message_to(current_object.player[0], none, "*ALERT!*Radiation levels at 25 percent!")
           		game.play_sound_for(current_object.player[0], timer_beep, true)
           		current_object.timer[0] = 18
        		end
        		inline: if current_object.timer[0] == 13 then 
           		game.show_message_to(current_object.player[0], none, "*ALERT!*Radiation levels at 50 percent!")
           		game.play_sound_for(current_object.player[0], timer_beep, true)
           		current_object.timer[0] = 12
        		end
        		inline: if current_object.timer[0] == 7 then 
           		game.show_message_to(current_object.player[0], none, "*ALERT!*Radiation levels at 75 percent!")
           		game.play_sound_for(current_object.player[0], timer_beep, true)
           		current_object.timer[0] = 6
        		end
				end
				if current_object.timer[0] == 1 then
        		game.show_message_to(current_object.player[0], none, "*ALERT!*Radiation levels FATAL!")
        		current_player.biped.kill(true)
        		current_object.object[0] = no_object
        		global.number[0] = 0
        		current_object.timer[0] = 0
 				end
			end
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...