Leeg Posted April 6, 2017 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 120 Reputation: 44 Joined: 11/13/11 Last Seen: July 22, 2024 Share Posted April 6, 2017 (edited) I can do this: if (!getarg(1)) set getarg(1), $@warpwaitingpc[0]; But I can't do this: if (!getarg(1)) getarg(1) = $@warpwaitingpc[0]; parse_line: expected ';' Intended behaviour? I thought 'set' was no longer needed in any context. Edited April 6, 2017 by Leeg Quote Link to comment Share on other sites More sharing options...
0 Daegaladh Posted April 6, 2017 Group: Developer Topic Count: 30 Topics Per Day: 0.01 Content Count: 239 Reputation: 147 Joined: 11/21/11 Last Seen: 14 hours ago Share Posted April 6, 2017 I have no idea how this even worked for you in the first place... getarg() is a function, not a variable, you just cannot set a value, it just gets the value you passed when calling the function. you need a variable .@i = getarg(1); if (!.@i) .@i = $@warpwaitingpc[0]; 1 Quote Link to comment Share on other sites More sharing options...
0 Leeg Posted April 6, 2017 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 120 Reputation: 44 Joined: 11/13/11 Last Seen: July 22, 2024 Author Share Posted April 6, 2017 So... it shouldn't be working with 'set' in the first place... ;D I guess I'll modify my code. 1 Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted April 7, 2017 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2370 Joined: 10/28/11 Last Seen: Yesterday at 05:27 AM Share Posted April 7, 2017 (edited) in your case, you have to use the set() script command. if (!getarg(1)) set getarg(1), $@warpwaitingpc[0]; if I recall correctly this should be the case. Edited April 7, 2017 by Emistry Quote Link to comment Share on other sites More sharing options...
0 Leeg Posted April 7, 2017 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 120 Reputation: 44 Joined: 11/13/11 Last Seen: July 22, 2024 Author Share Posted April 7, 2017 Yes. I already knew it works with set. Quote Link to comment Share on other sites More sharing options...
Question
Leeg
I can do this:
But I can't do this:
parse_line: expected ';'
Intended behaviour? I thought 'set' was no longer needed in any context.
Edited by LeegLink to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.